|
||||||||||
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
com.filenet.wcm.toolkit.server.util.WcmUploadInputStream
WcmUploadInputStream provides temporary caching of files found in a MIME encoded request body, presenting such a file as an InputStream.
Nested Class Summary |
Nested classes inherited from class com.filenet.wcm.api.impl.SerializableTransportInputStream |
com.filenet.wcm.api.impl.SerializableTransportInputStream.RetrievalInputStream |
Field Summary |
Fields inherited from class com.filenet.wcm.api.TransportInputStream |
CONTENT_SIZE_UNKNOWN |
Fields inherited from class java.io.FilterInputStream |
in |
Method Summary | |
void |
close()
Close this input stream. |
long |
getContentSize()
Get the length in bytes of the file content. |
java.lang.String |
getFilename()
Returns the original filename as specified by the user in the browser. |
static WcmUploadInputStream |
getInstance(WcmDataStore ds,
java.io.BufferedReader buff,
javax.servlet.http.HttpServletRequest req,
java.lang.String fileName)
The constructor for WcmUploadInputStream. |
static WcmUploadInputStream |
getInstance(WcmDataStore ds,
javax.servlet.http.HttpServletRequest req,
java.lang.String inputName)
The constructor for WcmUploadInputStream. |
static WcmUploadInputStream |
getInstance(WcmDataStore ds,
WcmMimeFormParser mfp,
javax.servlet.http.HttpServletRequest req)
The constructor for WcmUploadInputStream. |
java.lang.String |
getMimeType()
Returns the mime type of the uploaded file. |
java.lang.String |
getTempFileName()
Returns the name of the temporary cache file where the content is being stored on the web server. |
boolean |
isOpen()
Returns true/false whether or not this input stream is currently open for reading. |
boolean |
isValid()
Returns true/false whether or not the requested file content was found in the ServletInputStream of HttpServletRequest. |
Methods inherited from class com.filenet.wcm.api.TransportInputStream |
getContentElement, getContentStream, getElementSequenceNumber, setContentElement, setContentSize, setFilename, setMimeType |
Methods inherited from class java.io.FilterInputStream |
available, mark, markSupported, read, read, read, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static WcmUploadInputStream getInstance(WcmDataStore ds, javax.servlet.http.HttpServletRequest req, java.lang.String inputName) throws java.io.IOException
ds
- An instance of WcmDataStore.req
- The current HttpServletRequest.inputName
- The form input name corresponding to the file you want to cache/open (optional).
If null is specified, the first file encountered in the ServletInputStream will be cached.
java.io.IOException
public static WcmUploadInputStream getInstance(WcmDataStore ds, WcmMimeFormParser mfp, javax.servlet.http.HttpServletRequest req) throws java.io.IOException
ds
- An instance of WcmDataStore.mfp
- The WcmMimeFormParser to load from.
java.io.IOException
public static WcmUploadInputStream getInstance(WcmDataStore ds, java.io.BufferedReader buff, javax.servlet.http.HttpServletRequest req, java.lang.String fileName) throws java.io.IOException
ds
- buff
- req
- fileName
-
java.io.IOException
public long getContentSize()
public java.lang.String getMimeType()
public java.lang.String getFilename()
public java.lang.String getTempFileName()
public boolean isValid()
public boolean isOpen()
public void close() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |