|
FileNet Content Services Java Connector v3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
com.filenet.wcm.api.impl.SerializableTransportInputStream
com.filenet.wcm.api.TransportInputStream
A TransportInputStream
object is used for uploading (sending) or
downloading (receiving)
content to or from the Content Services server. An instance of this class acts
like a java.io.FilterInputStream
, but it also has
accessor methods for other items of information.
Field Summary | |
static long |
CONTENT_SIZE_UNKNOWN
This value, which is the default if setContentSize() is
not called, means that the content size is not known. |
Constructor Summary | |
TransportInputStream(java.io.InputStream in)
Creates a TransportInputStream object
and saves its argument, the input
stream in , for later use.
|
|
TransportInputStream(java.io.InputStream in,
long contentSize,
int contentElement,
java.lang.String mimeType,
java.lang.String filename)
Creates a TransportInputStream object with the specified content size, content
element number, MIME type, and filename and saves its argument, the input
stream in , for later use.
|
Method Summary | |
int |
getContentElement()
Returns the content element number for the input stream. |
long |
getContentSize()
Returns the number of bytes in the input stream. |
java.io.InputStream |
getContentStream()
Returns the underlying Java InputStream object
that TransportInputStream has wrapped for
transport to or from the Content Services server.
|
java.lang.String |
getFilename()
Returns the filename of the underlying document for the input stream. |
java.lang.String |
getMimeType()
Returns the MIME type of the underlying document for the input stream. |
void |
setContentElement(int contentElement)
Sets the content element number. |
void |
setContentSize(long contentSize)
Sets the number of bytes in the input stream. |
void |
setFilename(java.lang.String filename)
Sets the filename of the underlying document for the stream. |
void |
setMimeType(java.lang.String mimeType)
Not Applicable in CS Java Connector v3.0. |
Methods inherited from class java.io.FilterInputStream |
available, close, mark, markSupported, read, read, read, reset, skip |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final long CONTENT_SIZE_UNKNOWN
setContentSize()
is
not called, means that the content size is not known.
Constructor Detail |
public TransportInputStream(java.io.InputStream in, long contentSize, int contentElement, java.lang.String mimeType, java.lang.String filename)
TransportInputStream
object with the specified content size, content
element number, MIME type, and filename and saves its argument, the input
stream in
, for later use.
in
- The underlying input stream.
contentSize
- The number of bytes in the input stream.
contentElement
- The content element number. Content element numbering begins at 1.
mimeType
- The MIME type of the underlying document for the input stream.
filename
- The filename of the underlying document for the input stream.public TransportInputStream(java.io.InputStream in)
TransportInputStream
object
and saves its argument, the input
stream in
, for later use.
in
- The underlying input stream.Method Detail |
public java.lang.String getMimeType()
To determine the mime type of a downloaded document, this method reads mimeTypes.properties, a configuration file in the CS Java Toolkit. This configuration file maps file extensions to mime types. If TransportInputStream cannot locate a mime type by file extension, it returns the "application/octet-stream" mime type.
You can modify mimeTypes.properties if needed -- see CS Java Toolkit Developer's Guide for more information.
null
if not known.public void setMimeType(java.lang.String mimeType)
Not Applicable in CS Java Connector v3.0.
Sets the MIME type of the underlying document for the input stream.
mimeType
- The MIME type to set.public long getContentSize()
long
indicating the content size or
CONTENT_SIZE_UNKNOWN
.public void setContentSize(long contentSize)
CONTENT_SIZE_UNKNOWN
.
contentSize
- The content size in bytes.public int getContentElement()
Note: The Content Services Java Connector supports only the first content element.
int
indicating the content element number.public void setContentElement(int contentElement)
Note: The Content Services Java Connector supports only the first content element.
contentElement
- The content element number to set.public java.lang.String getFilename()
null
if not known.public void setFilename(java.lang.String filename)
filename
- The filename to set.public java.io.InputStream getContentStream()
InputStream
object
that TransportInputStream
has wrapped for
transport to or from the Content Services server.
InputStream
object.
|
FileNet Content Services Java Connector v3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |