org.apache.axis.attachments
Class BoundaryDelimitedStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended byorg.apache.axis.attachments.BoundaryDelimitedStream

public class BoundaryDelimitedStream
extends java.io.FilterInputStream

This class takes the input stream and turns it multiple streams.


Method Summary
 int available()
           
 void close()
          Closes the stream.
 BoundaryDelimitedStream getNextStream()
          Gets the next stream.
 void mark(int readlimit)
          mark the stream.
 boolean markSupported()
          markSupported return false;
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.
 void reset()
          reset the stream.
 
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

getNextStream

public BoundaryDelimitedStream getNextStream()
                                      throws java.io.IOException
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.
Throws:
java.io.IOException - if there was an error loading the data for the next stream

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Read from the boundary delimited stream.

Parameters:
b - is the array to read into.
off - is the offset
len -
Returns:
the number of bytes read. -1 if endof stream.
Throws:
java.io.IOException

read

public int read(byte[] b)
         throws java.io.IOException
Read from the boundary delimited stream.

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.
Throws:
java.io.IOException

read

public int read()
         throws java.io.IOException
Read from the boundary delimited stream.

Returns:
The byte read, or -1 if endof stream.
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Closes the stream.

Throws:
java.io.IOException

mark

public void mark(int readlimit)
mark the stream. This is not supported.

Parameters:
readlimit -

reset

public void reset()
           throws java.io.IOException
reset the stream. This is not supported.

Throws:
java.io.IOException

markSupported

public boolean markSupported()
markSupported return false;

Returns:

available

public int available()
              throws java.io.IOException
Throws:
java.io.IOException

printarry

public static void printarry(byte[] b,
                             int start,
                             int end)
Method printarry

Parameters:
b -
start -
end -


Copyright © 2003 Apache Web Services Project. A ll Rights Reserved.