|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
com.infoengine.object.IeInputStream
com.infoengine.object.IeMultipartInputStream
Field Summary | |
protected String |
boundary
|
(package private) static String |
BOUNDARY_PARAM
|
private String |
characterEncoding
|
private int |
contentLength
|
protected String |
contentType
|
private ContentHeader |
currentContentHeader
|
static String |
DEFAULT_BOUNDARY
|
static String |
DEFAULT_EOF
|
static String |
DEFAULT_EOL
|
protected boolean |
eofRead
|
private boolean |
firstBoundary
|
(package private) static String |
MULTIPART
|
(package private) static String |
MULTIPART_FORM_DATA
|
private boolean |
oneContent
|
private Hashtable |
parameters
|
protected Vector |
pushedBack
|
protected String |
requestContentType
|
private Vector |
xGroups
|
Fields inherited from class com.infoengine.object.IeInputStream |
inputBuffer, inputBufferCursor, inputBufferLimit, inputStream |
Fields inherited from class java.io.InputStream |
|
Constructor Summary | |
IeMultipartInputStream()
Use this constructor with setInputStream. |
|
IeMultipartInputStream(InputStream is)
This constructor will block until the mime header can be read off the input stream. |
|
IeMultipartInputStream(InputStream is,
String contentType,
String name,
String filename)
This constructor creates a multipart stream from a non-multipart input stream. |
|
IeMultipartInputStream(javax.servlet.ServletRequest request)
This constructor sets the internal input stream to the request's input stream. |
Method Summary | |
boolean |
eofRead()
|
String |
getBoundary()
Returns the MIME boundary string that separates the content objects read from the stream. |
ContentHeader |
getContentHeader()
Returns the last MIME content header object read from the input stream. |
int |
getContentLength()
|
String |
getContentType()
Returns the MIME content type associated with the multipart input stream as a whole. |
String |
getParameter(String name)
Returns the value of a named parameter. |
Enumeration |
getParameterNames()
Returns the names of all parameters. |
Vector |
getParameterValues(String name)
Returns the values of a named parameter. |
String |
getRequestContentType()
Returns the MIME content type associated with the incoming request. |
Enumeration |
getXGroups()
returns an Enumeration of IeGroup objects found in the incoming MIME stream. |
boolean |
pushBackCalled()
Returns an indication of whether any MIME content headers have ever been pushed onto the internal stack. |
void |
pushBackHeader(ContentHeader header)
Pushes a MIME content header object onto an internal stack. |
byte[] |
readBlob()
Reads the next BLOB on the input stream and returns it as a byte array. |
void |
readBlob(OutputStream os)
Reads the next BLOB on the input stream and writes it to an output stream. |
ContentHeader |
readBlobInfo()
Reads the next MIME content header from the input stream. |
String |
readBoundary()
Reads the next boundary line from the MIME input stream. |
ContentHeader |
readHeader()
|
int |
readLine(byte[] bbuf)
Reads the next line from the MIME input stream into a byte array. |
int |
readLine(byte[] bbuf,
int start,
int max)
Reads the next line from the MIME input stream into a byte array, beginning at a specific index of the array and continuing until the end of the line is detected or a maximum number of bytes is read. |
IeRequest |
readRequest()
Reads the next content object from the input stream and parses it as an Info*Engine request object. |
String |
readText()
Reads the next text object on the input stream and returns it as a String. |
void |
readText(OutputStream os)
Reads the next text object on the input stream and writes it to an output stream. |
IeCollection |
readVdb()
Reads the next content object from the input stream and parses it as an Info*Engine VDB object. |
private void |
readXVDB()
called to deal with POSTED MIME parts with content-type of application/x-infoengine-collection. |
void |
streamBlobs(OutputStream os)
Copies every BLOB on the input stream to an output stream. |
Methods inherited from class com.infoengine.object.IeInputStream |
available, close, getInputStream, mark, markSupported, read, read, read, readLine, readLine, reset, setInputStream, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static final String BOUNDARY_PARAM
static final String MULTIPART
static final String MULTIPART_FORM_DATA
public static final String DEFAULT_BOUNDARY
public static final String DEFAULT_EOF
public static final String DEFAULT_EOL
protected String contentType
protected String requestContentType
protected String boundary
protected boolean eofRead
private boolean oneContent
private ContentHeader currentContentHeader
protected Vector pushedBack
private boolean firstBoundary
private Hashtable parameters
private Vector xGroups
private String characterEncoding
private int contentLength
Constructor Detail |
public IeMultipartInputStream()
public IeMultipartInputStream(javax.servlet.ServletRequest request) throws IOException
request
- A servlet request object from which to obtain an
input stream containing a MIME multipart object.public IeMultipartInputStream(InputStream is) throws IOException
is
- The input stream containing a MIME multipart object.public IeMultipartInputStream(InputStream is, String contentType, String name, String filename) throws IOException
is
- The non-multipart input stream.contentType
- The MIME content type to be associated with
the stream.name
- The form variable name to be associated with the stream.filename
- The file name to be associated with the stream.Method Detail |
private void readXVDB() throws IOException
IOException
public Enumeration getXGroups()
public String getParameter(String name)
Parameters are available only when an IeMultipartInputStream is derived from a ServletRequest object (see the appropriate constructor above). Parameters are form variables submitted in an HTTP POST request with the MIME type multipart/form-data.
name
- The name of the parameter.
public Vector getParameterValues(String name)
Parameters are available only when an IeMultipartInputStream is derived from a ServletRequest object (see the appropriate constructor above). Parameters are form variables submitted in an HTTP POST request with the MIME type multipart/form-data.
name
- The name of the parameter.
public Enumeration getParameterNames()
Parameters are available only when an IeMultipartInputStream is derived from a ServletRequest object (see the appropriate constructor above). Parameters are form variables submitted in an HTTP POST request with the MIME type multipart/form-data.
public ContentHeader getContentHeader()
public IeRequest readRequest() throws IOException, IEException
IOException
- if the next object on the input stream is not an
Info*Engine request object.
IEException
public IeCollection readVdb() throws IOException, IEException
IOException
- if the next object on the input stream is not an
Info*Engine VDB object.
IEException
public void readBlob(OutputStream os) throws IOException
os
- The output stream on which to write the BLOB.
IOException
- if the input stream can not be read
successfully.public byte[] readBlob() throws IOException
IOException
- if the input stream can not be read
successfully.public void readText(OutputStream os) throws IOException
os
- The output stream on which to write the text object.
IOException
- if the input stream can not be read
successfully.public String readText() throws IOException
IOException
- if the input stream can not be read
successfully.public ContentHeader readBlobInfo() throws IOException
IOException
- if the input stream can not be read
successfully.public void streamBlobs(OutputStream os) throws IOException
os
- The output stream on which to write all of the BLOB's
read from the input stream.
IOException
- if the input stream can not be read or
the output stream can not be written
successfully.public String readBoundary() throws IOException
IOException
- if the input stream can not be read
successfully.public int readLine(byte[] bbuf) throws IOException
bbuf
- The byte array in which to store the bytes read from the
input stream.
IOException
- if the input stream can not be read
successfully.public int readLine(byte[] bbuf, int start, int max) throws IOException
bbuf
- The byte array in which to store the bytes read from the
input stream.start
- The index of the array in which to store the first byte.max
- The maximum number of bytes to read.
IOException
- if the input stream can not be read
successfully.public String getRequestContentType()
public String getContentType()
public String getBoundary()
public void pushBackHeader(ContentHeader header)
header
- The content header to be pushed onto the stack.public boolean pushBackCalled()
public ContentHeader readHeader() throws IOException
IOException
public int getContentLength()
public boolean eofRead()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |