|
Oracle® WebCenter Content Site Studio for External Applications Java API Reference 11g Release 1 (11.1.1) E17273-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
java.io.InputStream
oracle.stellent.wcm.common.http.MultipartBoundaryInputStream
public class MultipartBoundaryInputStream
This class encapsulates parsing functionality for RFC1867, multipart/form-data. See MultipartBoundaryInputStreamTest and MultipartIterator for usage examples.
Field Summary | |
---|---|
protected java.lang.String |
boundary The boundary. |
protected boolean |
boundaryEncountered Whether or not the boundary has been encountered. |
protected long |
bytesRead The total number of bytes read so far. |
protected java.lang.String |
elementCharset The character encoding of the element, specified in the element's Content-Type header. |
protected java.lang.String |
elementContentDisposition The Content-Disposition for the current form element being read. |
protected java.lang.String |
elementContentType The Content-Type of the current form element being read. |
protected java.lang.String |
elementFileName The filename of the current form element being read, null if the current form element is text data. |
protected java.lang.String |
elementName The name of the current form element being read. |
protected boolean |
endOfStream Whether or not the end of the stream has been read. |
protected boolean |
finalBoundaryEncountered Whether or not the final boundary has been encountered. |
protected java.io.InputStream |
inputStream The InputStream to read from. |
protected long |
maxLength The maximum length in bytes to read from the stream at a time, or -1 for unlimited length. |
protected boolean |
maxLengthMet Whether or not the maximum length has been met. |
Constructor Summary | |
---|---|
MultipartBoundaryInputStream() |
Method Summary | |
---|---|
long |
getBytesRead() |
java.lang.String |
getElementCharset() Gets the character encoding of the current element. |
java.lang.String |
getElementContentDisposition() Gets the value for the "Content-Dispositio" header for the current multipart element. |
java.lang.String |
getElementContentType() Gets the "Content-Type" of the current element. |
java.lang.String |
getElementFileName() Gets the filename of the current element, which will be null if the current element isn't a file. |
java.lang.String |
getElementName() Gets the name of the current element. |
long |
getMaxLength() |
boolean |
isBoundaryEncountered() Returns whether or not the boundary has been encountered while reading data. |
boolean |
isElementFile() Gets whether or not the current form element being read is a file. |
boolean |
isEndOfStream() Whether or not an EOF has been read on the stream. |
boolean |
isFinalBoundaryEncountered() Returns whether or not the final boundary has been encountered. |
boolean |
isMaxLengthMet() Whether or not the maximum length has been met. |
void |
mark(int i) Marks the underlying stream. |
int |
read() Reads from the stream. |
int |
read(byte[] buffer) |
int |
read(byte[] buffer, int offset, int length) |
void |
reset() Resets the underlying input stream. |
void |
resetForNextBoundary() Resets this stream for use with the next element, to be used after a boundary is encountered. |
void |
setBoundary(java.lang.String boundary) Sets the boundary that terminates the data for the stream, after adding the prefix "--" |
void |
setInputStream(java.io.InputStream stream) Sets the input stream used to read multipart data. |
void |
setLineSize(int size) |
void |
setMaxLength(long maxLength) Set the maximum length in bytes to read, or -1 for an unlimited length. |
Methods inherited from class java.io.InputStream |
---|
available, close, markSupported, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.InputStream inputStream
protected java.lang.String boundary
protected boolean boundaryEncountered
protected boolean finalBoundaryEncountered
protected boolean endOfStream
protected java.lang.String elementContentDisposition
protected java.lang.String elementName
protected java.lang.String elementContentType
protected java.lang.String elementFileName
null
if the current form element is text data.protected java.lang.String elementCharset
protected long maxLength
protected boolean maxLengthMet
protected long bytesRead
Constructor Detail |
---|
public MultipartBoundaryInputStream()
Method Detail |
---|
public void setBoundary(java.lang.String boundary)
public void resetForNextBoundary() throws java.io.IOException
java.io.IOException
public void setInputStream(java.io.InputStream stream) throws java.io.IOException
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] buffer) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] buffer, int offset, int length) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public void mark(int i)
mark
in class java.io.InputStream
public void reset() throws java.io.IOException
reset
in class java.io.InputStream
java.io.IOException
public void setMaxLength(long maxLength)
public long getMaxLength()
public boolean isMaxLengthMet()
public java.lang.String getElementContentDisposition()
public java.lang.String getElementName()
public java.lang.String getElementCharset()
public java.lang.String getElementContentType()
public java.lang.String getElementFileName()
public boolean isElementFile()
public boolean isBoundaryEncountered()
public boolean isFinalBoundaryEncountered()
public boolean isEndOfStream()
public void setLineSize(int size)
public long getBytesRead()
|
Oracle® WebCenter Content Site Studio for External Applications Java API Reference 11g Release 1 (11.1.1) E17273-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |