SAP NetWeaver '04

com.sap.netweaver.bc.rf.common.content
Class Content

[contained in: com.sap.netweaver.bc.rf.par - bc.rf.common_api.jar]
java.lang.Object
  |
  +--com.sap.netweaver.bc.rf.common.content.Content
All Implemented Interfaces:
IContent
Direct Known Subclasses:
MutableContent

public class Content
extends java.lang.Object
implements IContent

Access to the content data of a resource.


Field Summary
protected  IContentMetadata contentMetadata
           
 
Constructor Summary
Content(java.io.InputStream inputStream, IContentMetadata contentMetadata)
          Constructs Content object, for use when media subtype and encoding are available as individual values.
Content(java.io.InputStream inputStream, java.lang.String mediaType, long contentLength)
          Constructs Content object, for use when encoding is not known separately but may be present in media type string.
Content(java.io.InputStream inputStream, java.lang.String mediaType, long contentLength, java.lang.String encoding, java.lang.String language)
          Constructs Content object, for use when media subtype and encoding are available as individual values.
 
Method Summary
 void close()
          Close content input stream.
 IContentMetadata getContentMetadata()
          Get the metadata attribute of the Content object.
 java.io.InputStream getInputStream()
          Get the inputStream attribute of the Content object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contentMetadata

protected IContentMetadata contentMetadata
Constructor Detail

Content

public Content(java.io.InputStream inputStream,
               IContentMetadata contentMetadata)
Constructs Content object, for use when media subtype and encoding are available as individual values.
Parameters:
inputStream - input stream
contentMetadata - content metadata

Content

public Content(java.io.InputStream inputStream,
               java.lang.String mediaType,
               long contentLength,
               java.lang.String encoding,
               java.lang.String language)
Constructs Content object, for use when media subtype and encoding are available as individual values.
Parameters:
inputStream - input stream
mediaType - media type of content (trailing parameters are ignored)
contentLength - length of content (use -1 when unknown)
encoding - character encoding (use null when unknown)
language - content language (use null when unknown)

Content

public Content(java.io.InputStream inputStream,
               java.lang.String mediaType,
               long contentLength)
Constructs Content object, for use when encoding is not known separately but may be present in media type string.
Parameters:
inputStream - input stream
mediaType - media type of content (trailing parameters except encoding information is ignored)
contentLength - length of content (use -1 when unknown)
Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws ResourceException
Get the inputStream attribute of the Content object.
Specified by:
getInputStream in interface IContent
Returns:
The inputStream value
Throws:
ResourceException - Exception raised in failure situation

getContentMetadata

public IContentMetadata getContentMetadata()
                                    throws ResourceException
Get the metadata attribute of the Content object.
Specified by:
getContentMetadata in interface IContent
Returns:
The metadata value
Throws:
ResourceException - Exception raised in failure situation

close

public void close()
Close content input stream.

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.