|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream java.io.FilterInputStream org.apache.axis.attachments.DimeDelimitedInputStream
This class takes the input stream and turns it multiple streams. DIME version 0 format
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ --- | VERSION |B|E|C| TYPE_T| OPT_T | OPTIONS_LENGTH | A +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ID_LENGTH | TYPE_LENGTH | Always present 12 bytes +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ even on chunked data. | DATA_LENGTH | V +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ --- | / / OPTIONS + PADDING / / (absent for version 0) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | / / ID + PADDING / / | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | / / TYPE + PADDING / / | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | / / DATA + PADDING / / | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+This implementation of input stream does not support marking operations.
Method Summary | |
int |
available()
|
void |
close()
Closes the stream. |
java.lang.String |
getContentId()
Get the id for this stream part. |
DimeTypeNameFormat |
getDimeTypeNameFormat()
|
java.lang.String |
getType()
Get the type, as read from the header. |
void |
mark(int readlimit)
Mark the stream. |
boolean |
markSupported()
|
int |
read()
Read from the boundary delimited stream. |
int |
read(byte[] b)
Read from the delimited stream. |
int |
read(byte[] b,
int off,
int len)
Read from the DIME stream. |
void |
reset()
|
Methods inherited from class java.io.FilterInputStream |
skip |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public java.lang.String getContentId()
public DimeTypeNameFormat getDimeTypeNameFormat()
public java.lang.String getType()
public int read(byte[] b, int off, int len) throws java.io.IOException
b
- is the array to read into.off
- is the offset
java.io.IOException
- if data could not be read from the streampublic int read(byte[] b) throws java.io.IOException
b
- is the array to read into. Read as much as possible
into the size of this array.
java.io.IOException
- if data could not be read from the streampublic int read() throws java.io.IOException
java.io.IOException
- if there was an error reading the datapublic void close() throws java.io.IOException
This will take care of flushing any remaining data to the strea.
Multiple calls to this method will result in the stream being closed once and then all subsequent calls being ignored.
java.io.IOException
- if the stream could not be closedpublic void mark(int readlimit)
public void reset() throws java.io.IOException
java.io.IOException
public boolean markSupported()
public int available() throws java.io.IOException
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |