public class BoundaryDelimitedStream extends FilterInputStream
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
boundary |
protected static int |
BOUNDARY_NOT_FOUND
Field BOUNDARY_NOT_FOUND.
|
protected static org.apache.commons.logging.Log |
log
The
Log that this class should log all events to. |
protected int |
streamNo
Field streamNo.
|
in| Modifier | Constructor and Description |
|---|---|
protected |
BoundaryDelimitedStream(BoundaryDelimitedStream prev,
int readbufsz)
Constructor to create the next stream from the previous one.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
protected int |
boundaryPosition(byte[] searchbuf,
int start,
int end)
Read from the boundary delimited stream.
|
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.
|
void |
reset()
reset the stream.
|
skipprotected static org.apache.commons.logging.Log log
Log that this class should log all events to.protected byte[] boundary
protected static final int BOUNDARY_NOT_FOUND
protected int streamNo
protected BoundaryDelimitedStream(BoundaryDelimitedStream prev, int readbufsz) throws IOException
prev - the previous streamreadbufsz - how many bytes to make the read bufferIOException - if there was a problem reading data from
prevprotected static int newStreamNo()
public BoundaryDelimitedStream getNextStream() throws IOException
IOException - if there was an error loading the data for
the next streamprotected BoundaryDelimitedStream getNextStream(int readbufsz) throws IOException
readbufsz - IOException - if there was an error loading the data for
the next streampublic int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamb - is the array to read into.off - is the offsetlen - IOExceptionpublic int read(byte[] b)
throws IOException
read in class FilterInputStreamb - is the array to read into. Read as much as possible
into the size of this array.IOExceptionpublic int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOExceptionpublic void mark(int readlimit)
mark in class FilterInputStreamreadlimit - public void reset()
throws IOException
reset in class FilterInputStreamIOExceptionpublic boolean markSupported()
markSupported in class FilterInputStreampublic int available()
throws IOException
available in class FilterInputStreamIOExceptionprotected int boundaryPosition(byte[] searchbuf,
int start,
int end)
throws IOException
searchbuf - buffer to read fromstart - starting indexend - ending indexIOException - if there was an error manipulating the
underlying streamprotected void finalClose()
throws IOException
IOException - if the stream could not be closedpublic static void printarry(byte[] b,
int start,
int end)
b - start - end - Copyright © The Apache Software Foundation. All Rights Reserved.