public class Content extends Object implements IContent, IMutableEntityMetadata
Copyright (c) SAP AG 2001-2002
| Constructor and Description |
|---|
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)
Constructs Content object, for use when media subtype and encoding are
available as individual values.
|
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()
Stop using this content object.
|
long |
getContentLength()
Returns the length of the resource content
|
String |
getContentType()
Returns the content type of the resource data
|
String |
getEncoding()
Returns the name of the character encoding of textual content
|
String |
getEntityTag()
|
Date |
getExpiryDate() |
InputStream |
getInputStream()
Returns the input stream of the resource content.
|
String |
getLanguage() |
Date |
getLastModified() |
void |
setEntityTag(String entityTag) |
void |
setLastModified(Date lastModified) |
boolean |
wasUpdated() |
public Content(InputStream inputStream, String mediaType, long contentLength, String encoding)
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)public 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 ContentException
IContentgetInputStream in interface IContentContentExceptionpublic long getContentLength()
throws ContentException
IContentgetContentLength in interface IContentContentExceptionpublic String getContentType() throws ContentException
IContentgetContentType in interface IContentContentExceptionpublic String getEncoding() throws ContentException
IContentgetEncoding in interface IContentnull )ContentException - Exception raised in failure situationpublic String getEntityTag() throws ResourceException
IEntityMetadataThe Format MUST be either:
getEntityTag in interface IEntityMetadatanull when not knownResourceExceptionpublic void setEntityTag(String entityTag) throws ResourceException
setEntityTag in interface IMutableEntityMetadataentityTag - entity-tag (see RFC2616 , section 14.19).ResourceException - Exception raised in failure situationpublic Date getExpiryDate() throws ResourceException
getExpiryDate in interface IEntityMetadatanull when not specifiedResourceExceptionpublic String getLanguage() throws ResourceException
getLanguage in interface IEntityMetadatanull when not knownResourceExceptionpublic Date getLastModified() throws ResourceException
getLastModified in interface IEntityMetadatanull when not knownResourceExceptionpublic void setLastModified(Date lastModified) throws ResourceException
setLastModified in interface IMutableEntityMetadatalastModified - last modified timestamp (see RFC2616 , section 14.29)ResourceException - Exception raised in failure situationpublic boolean wasUpdated()
wasUpdated in interface IMutableEntityMetadata| 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 2017 SAP AG Complete Copyright Notice