public class Content extends Object implements IContent
Modifier and Type | Field and Description |
---|---|
protected IContentMetadata |
contentMetadata |
Constructor and Description |
---|
Content(InputStream inputStream,
IContentMetadata contentMetadata)
Constructs Content object, for use when media subtype and encoding are
available as individual values.
|
Content(InputStream inputStream,
String mediaType,
long contentLength)
Constructs Content object, for use when encoding is not known separately
but may be present in media type string.
|
Content(InputStream inputStream,
String mediaType,
long contentLength,
String encoding,
String language)
Constructs Content object, for use when media subtype and encoding are
available as individual values.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close content input stream.
|
IContentMetadata |
getContentMetadata()
Get the metadata attribute of the Content object.
|
InputStream |
getInputStream()
Get the inputStream attribute of the Content object.
|
protected IContentMetadata contentMetadata
public Content(InputStream inputStream, IContentMetadata contentMetadata)
inputStream
- input streamcontentMetadata
- content metadatapublic Content(InputStream inputStream, String mediaType, long contentLength, String encoding, String language)
inputStream
- input streammediaType
- 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)public Content(InputStream inputStream, String mediaType, long contentLength)
inputStream
- input streammediaType
- media type of content (trailing parameters except encoding
information is ignored)contentLength
- length of content (use -1 when unknown)public InputStream getInputStream() throws ResourceException
getInputStream
in interface IContent
ResourceException
- Exception raised in failure situationpublic IContentMetadata getContentMetadata() throws ResourceException
getContentMetadata
in interface IContent
ResourceException
- Exception raised in failure situationpublic void close()
Access Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2018 SAP AG Complete Copyright Notice