public class URLContent extends Object implements IURLContent
| Constructor and Description |
|---|
URLContent(URL urlObject,
HeaderFields header,
InputStream in,
boolean cached)
Constructs a new content object
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Stop using this content object.
|
long |
getContentLength()
Get the size of the content data.
|
String |
getContentType()
Get the content type from the header fields collection.
|
String |
getEncoding()
Returns the name of the character encoding of textual content
|
protected long |
getFetchTime() |
String |
getFilename()
Returns the filename
|
HeaderFields |
getHeader()
Returns a collection of the header fields for the content.
|
InputStream |
getInputStream()
Returns the input stream to read the content.
|
String |
getURL()
Returns the URL
|
boolean |
isFile() |
boolean |
isHttp() |
void |
setHeader(HeaderFields header)
Set header fields.
|
void |
writeTo(OutputStream out)
Writes the content to the specified output.
|
public URLContent(URL urlObject, HeaderFields header, InputStream in, boolean cached) throws IOException
urlObject - Holds the URL that points to the content sourceheader - HTTP response or multi-part mime headersin - An InputStream to read the content fromcached - TBD: Description of the incoming method parameterIOExceptionpublic InputStream getInputStream()
getInputStream in interface IContentgetInputStream in interface IURLContentpublic void writeTo(OutputStream out) throws URLContentAccessException
writeTo in interface IURLContentout - An output stream referenceURLContentAccessException - Exception raised in failure situationpublic HeaderFields getHeader()
IURLContentgetHeader in interface IURLContentpublic void setHeader(HeaderFields header)
IURLContentsetHeader in interface IURLContentheader - The header fields.public String getContentType()
IURLContentgetContentType in interface IContentgetContentType in interface IURLContentpublic long getContentLength()
IURLContentgetContentLength in interface IContentgetContentLength in interface IURLContentpublic String getURL()
IURLContentgetURL in interface IURLContentpublic String getFilename()
IURLContentgetFilename in interface IURLContentpublic String getEncoding() throws ContentException
IContentgetEncoding in interface IContentnull )ContentException - Exception raised in failure situationpublic boolean isFile()
public boolean isHttp()
public void close()
IContentprotected long getFetchTime()
| 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 2021 SAP SE Complete Copyright Notice