|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
org.jboss.soa.esb.actions.soap.attachment.BoundaryDelimitedInputStream
public class BoundaryDelimitedInputStream
BoundaryDelimitedInputStream
encapsulates a stream that is
sepearated into different sections by a common boundary, such as a MIME
multipart message. The full stream is referred to as the outer stream. Each
boundary separated section in the outer stream is referred to as an inner
stream.
All read() methods will start from the first inner stream, returning -1 when
a boundary is reached. Subsequent calls will then advance to the next stream,
skipping the boundary.
Field Summary |
---|
Fields inherited from class java.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
BoundaryDelimitedInputStream(java.io.InputStream in,
byte[] boundary)
Constructs a BoundaryDelimitedInputStream using the passed
InputStream as the source for the outer stream. |
Method Summary | |
---|---|
int |
available()
This method will always return 0 because this input stream must always read ahead to determine the location of the boundary. |
void |
close()
Close this input stream, and its source input stream. |
boolean |
isOuterStreamClosed()
Returns whether the outer stream is closed. |
boolean |
markSupported()
Returns false. |
void |
printLeftOvers()
|
int |
read()
Reads a single byte from the inner input stream. |
int |
read(byte[] b)
Reads from the inner input stream, attempting to fill the passed byte array. |
int |
read(byte[] b,
int off,
int len)
Reads the specified number of bytes starting from the specified offset into the specified buffer from the inner input stream. |
long |
skip(long n)
Skips the specified number of bytes from the inner input stream. |
Methods inherited from class java.io.FilterInputStream |
---|
mark, reset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BoundaryDelimitedInputStream(java.io.InputStream in, byte[] boundary)
BoundaryDelimitedInputStream
using the passed
InputStream
as the source for the outer stream.
in
- the source input streamboundary
- the byte boundary separating sections of this streamMethod Detail |
---|
public int available() throws java.io.IOException
available
in class java.io.FilterInputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.FilterInputStream
java.io.IOException
public boolean markSupported()
markSupported
in class java.io.FilterInputStream
public int read() throws java.io.IOException
InputStream
.
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] b) throws java.io.IOException
InputStream
.
read
in class java.io.FilterInputStream
b
- the byte array to populate
b
, -1 on EOF
java.io.IOException
public long skip(long n) throws java.io.IOException
InputStream
.
skip
in class java.io.FilterInputStream
n
- the number of bytes to skip
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
InputStream
.
read
in class java.io.FilterInputStream
b
- the byte array to populateoff
- the offset in the array to start atlen
- the number of bytes to read, -1 on EOF
java.io.IOException
public boolean isOuterStreamClosed()
public void printLeftOvers()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |