org.apache.axis.attachments
Class BoundaryDelimitedStream
java.lang.Object
|
+--java.io.InputStream
|
+--java.io.FilterInputStream
|
+--org.apache.axis.attachments.BoundaryDelimitedStream
- public class BoundaryDelimitedStream
- extends java.io.FilterInputStream
This class takes the input stream and turns it multiple streams.
Fields inherited from class java.io.FilterInputStream |
in |
Methods inherited from class java.io.FilterInputStream |
available, mark, markSupported, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
boundary
protected byte[] boundary
BOUNDARY_NOT_FOUND
protected static final int BOUNDARY_NOT_FOUND
streamNo
protected int streamNo
BoundaryDelimitedStream
protected BoundaryDelimitedStream(BoundaryDelimitedStream prev,
int readbufsz)
- Constructor to create the next stream from the previous one.
newStreamNo
protected static int newStreamNo()
getNextStream
public BoundaryDelimitedStream getNextStream()
- Gets the next stream. From the previous using the same buffer size to read.
- Returns:
- the boundary delmited stream. Null if there are no more streams.
getNextStream
protected BoundaryDelimitedStream getNextStream(int readbufsz)
- Gets the next stream. From the previous using new buffer reading size.
- Returns:
- the boundary delmited stream. Null if there are no more streams.
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
- Read from the boundary delimited stream.
- Overrides:
read
in class java.io.FilterInputStream
- Parameters:
b
- is the array to read into.off
- is the offset- Returns:
- the number of bytes read. -1 if endof stream.
read
public int read(byte[] b)
throws java.io.IOException
- Read from the boundary delimited stream.
- Overrides:
read
in class java.io.FilterInputStream
- Parameters:
b
- is the array to read into. Read as much as possible
into the size of this array.- Returns:
- the number of bytes read. -1 if endof stream.
read
public int read()
throws java.io.IOException
- Read from the boundary delimited stream.
- Overrides:
read
in class java.io.FilterInputStream
- Returns:
- The byte read, or -1 if endof stream.
close
public void close()
throws java.io.IOException
- Closes the stream.
- Overrides:
close
in class java.io.FilterInputStream
printarry
public static void printarry(byte[] b,
int start,
int end)
Copyright © 2001 Apache XML Project. All Rights Reserved.