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
IContent
getInputStream
in interface IContent
ContentException
public long getContentLength() throws ContentException
IContent
getContentLength
in interface IContent
ContentException
public String getContentType() throws ContentException
IContent
getContentType
in interface IContent
ContentException
public String getEncoding() throws ContentException
IContent
getEncoding
in interface IContent
null
)ContentException
- Exception raised in failure situationpublic String getEntityTag() throws ResourceException
IEntityMetadata
The Format MUST be either:
getEntityTag
in interface IEntityMetadata
null
when not knownResourceException
public void setEntityTag(String entityTag) throws ResourceException
setEntityTag
in interface IMutableEntityMetadata
entityTag
- entity-tag (see RFC2616 , section 14.19).ResourceException
- Exception raised in failure situationpublic Date getExpiryDate() throws ResourceException
getExpiryDate
in interface IEntityMetadata
null
when not specifiedResourceException
public String getLanguage() throws ResourceException
getLanguage
in interface IEntityMetadata
null
when not knownResourceException
public Date getLastModified() throws ResourceException
getLastModified
in interface IEntityMetadata
null
when not knownResourceException
public void setLastModified(Date lastModified) throws ResourceException
setLastModified
in interface IMutableEntityMetadata
lastModified
- 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 2018 SAP AG Complete Copyright Notice