|
|||||||||
| Home >> All >> org >> apache >> axis >> [ attachments overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.axis.attachments
Class BoundaryDelimitedStream

java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
org.apache.axis.attachments.BoundaryDelimitedStream
- All Implemented Interfaces:
- java.io.Closeable
- public class BoundaryDelimitedStream
- extends java.io.FilterInputStream
This class takes the input stream and turns it multiple streams.
| Field Summary | |
protected byte[] |
boundary
|
protected static int |
BOUNDARY_NOT_FOUND
Field BOUNDARY_NOT_FOUND. |
(package private) int |
boundaryBufLen
The boundary length plus crlf. |
(package private) int |
boundaryLen
The boundary length. |
(package private) int |
boundaryPos
Field boundaryPos. |
(package private) boolean |
closed
The stream has been closed. |
(package private) boolean |
eos
eof has been detected. |
(package private) java.io.InputStream |
is
The source input stream. |
(package private) static boolean |
isDebugEnabled
Field isDebugEnabled. |
protected static org.apache.commons.logging.Log |
log
The Log that this class should log all events to. |
(package private) byte[] |
readbuf
The buffer we are reading. |
(package private) int |
readBufEnd
The number of bytes in array. |
(package private) int |
readBufPos
Where we have read so far in the stream. |
(package private) int |
readbufsz
Minimum to read at one time. |
private int[] |
skip
|
(package private) static int |
streamCount
The number of streams produced. |
protected int |
streamNo
Field streamNo. |
(package private) boolean |
theEnd
There are no more streams left. |
| Fields inherited from class java.io.FilterInputStream |
in |
| Constructor Summary | |
protected |
BoundaryDelimitedStream(BoundaryDelimitedStream prev,
int readbufsz)
Constructor to create the next stream from the previous one. |
(package private) |
BoundaryDelimitedStream(java.io.InputStream is,
byte[] boundary,
int readbufsz)
Create a new boundary stream. |
| Method Summary | |
int |
available()
Calls the in.available() method. |
protected int |
boundaryPosition(byte[] searchbuf,
int start,
int end)
Read from the boundary delimited stream. |
private int |
boundarySearch(byte[] text,
int start,
int end)
|
void |
close()
Closes the stream. |
protected void |
finalClose()
Close the underlying stream and remove all references to it. |
BoundaryDelimitedStream |
getNextStream()
Gets the next stream. |
protected BoundaryDelimitedStream |
getNextStream(int readbufsz)
Gets the next stream. |
void |
mark(int readlimit)
mark the stream. |
boolean |
markSupported()
markSupported return false; |
protected static int |
newStreamNo()
Signal that a new stream has been created. |
static void |
printarry(byte[] b,
int start,
int end)
Method printarry |
int |
read()
Read from the boundary delimited stream. |
int |
read(byte[] b)
Read from the boundary delimited stream. |
int |
read(byte[] b,
int off,
int len)
Read from the boundary delimited stream. |
private int |
readFromStream(byte[] b)
|
private int |
readFromStream(byte[] b,
int start,
int length)
|
void |
reset()
reset the stream. |
| Methods inherited from class java.io.FilterInputStream |
skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
log
protected static org.apache.commons.logging.Log log
- The
Logthat this class should log all events to.
boundary
protected byte[] boundary
boundaryLen
int boundaryLen
- The boundary length.
boundaryBufLen
int boundaryBufLen
- The boundary length plus crlf.
is
java.io.InputStream is
- The source input stream.
closed
boolean closed
- The stream has been closed.
eos
boolean eos
- eof has been detected.
theEnd
boolean theEnd
- There are no more streams left.
readbufsz
int readbufsz
- Minimum to read at one time.
readbuf
byte[] readbuf
- The buffer we are reading.
readBufPos
int readBufPos
- Where we have read so far in the stream.
readBufEnd
int readBufEnd
- The number of bytes in array.
BOUNDARY_NOT_FOUND
protected static final int BOUNDARY_NOT_FOUND
- Field BOUNDARY_NOT_FOUND.
- See Also:
- Constant Field Values
boundaryPos
int boundaryPos
- Field boundaryPos.
streamCount
static int streamCount
- The number of streams produced.
streamNo
protected int streamNo
- Field streamNo.
isDebugEnabled
static boolean isDebugEnabled
- Field isDebugEnabled.
skip
private int[] skip
| Constructor Detail |
BoundaryDelimitedStream
protected BoundaryDelimitedStream(BoundaryDelimitedStream prev, int readbufsz) throws java.io.IOException
- Constructor to create the next stream from the previous one.
BoundaryDelimitedStream
BoundaryDelimitedStream(java.io.InputStream is, byte[] boundary, int readbufsz) throws org.apache.axis.AxisFault
- Create a new boundary stream.
| Method Detail |
newStreamNo
protected static int newStreamNo()
- Signal that a new stream has been created.
getNextStream
public BoundaryDelimitedStream getNextStream() throws java.io.IOException
- Gets the next stream. From the previous using the same buffer size to
read.
getNextStream
protected BoundaryDelimitedStream getNextStream(int readbufsz) throws java.io.IOException
- Gets the next stream. From the previous using new buffer reading size.
readFromStream
private final int readFromStream(byte[] b)
throws java.io.IOException
readFromStream
private final int readFromStream(byte[] b,
int start,
int length)
throws java.io.IOException
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
- Read from the boundary delimited stream.
read
public int read(byte[] b)
throws java.io.IOException
- Read from the boundary delimited stream.
read
public int read()
throws java.io.IOException
- Read from the boundary delimited stream.
close
public void close()
throws java.io.IOException
- Closes the stream.
mark
public void mark(int readlimit)
- mark the stream.
This is not supported.
reset
public void reset()
throws java.io.IOException
- reset the stream.
This is not supported.
markSupported
public boolean markSupported()
- markSupported
return false;
available
public int available()
throws java.io.IOException
- Description copied from class:
java.io.FilterInputStream - Calls the
in.available()method.
boundaryPosition
protected int boundaryPosition(byte[] searchbuf,
int start,
int end)
throws java.io.IOException
- Read from the boundary delimited stream.
boundarySearch
private int boundarySearch(byte[] text,
int start,
int end)
finalClose
protected void finalClose()
throws java.io.IOException
- Close the underlying stream and remove all references to it.
printarry
public static void printarry(byte[] b,
int start,
int end)
- Method printarry
|
|||||||||
| Home >> All >> org >> apache >> axis >> [ attachments overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC