|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
org.apache.axiom.attachments.BoundaryPushbackInputStream
public class BoundaryPushbackInputStream
An InputStream that reads bytes up to a boundary. The boundary is not logically part of the bytes to read. The wrapped PushbackInputStream is set to to the byte after the boundary once the bytes are read. The boundary is not logically returned. There are two forms that are supported, where . is a byte .......................boundary and ..................../r/nboundary In both cases, only the bytes (.) are returned.
Field Summary | |
---|---|
(package private) int |
bIndex
|
(package private) byte[] |
boundary
|
protected static int |
BOUNDARY_NT_FOUND
|
(package private) boolean |
boundaryFound
|
(package private) byte[] |
buffer
|
(package private) int |
bufferSize
|
(package private) int |
index
|
(package private) java.io.PushbackInputStream |
is
|
private static boolean |
isDebugEnabled
|
private static org.apache.commons.logging.Log |
log
|
(package private) int |
MIN_BUF_SIZE
|
(package private) int |
numBytes
|
private byte[] |
read_byte
|
(package private) int |
rnBoundaryLen
|
private short[] |
skip
|
Constructor Summary | |
---|---|
BoundaryPushbackInputStream(java.io.PushbackInputStream inStream,
byte[] boundary,
int pushBackSize)
|
Method Summary | |
---|---|
protected int |
boundaryPosition(byte[] searchbuf,
int start,
int end)
Read from the boundary delimited stream. |
boolean |
getBoundaryStatus()
|
int |
read()
Read from the boundary delimited stream. |
int |
read(byte[] b)
|
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)
Method readFromStream |
java.lang.String |
toString()
toString dumps state information. |
private void |
unread()
Unread the bytes past the buffer |
Methods inherited from class java.io.InputStream |
---|
available, close, mark, markSupported, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static org.apache.commons.logging.Log log
private static boolean isDebugEnabled
java.io.PushbackInputStream is
boolean boundaryFound
byte[] boundary
int rnBoundaryLen
byte[] buffer
int bufferSize
int numBytes
int index
int bIndex
final int MIN_BUF_SIZE
protected static final int BOUNDARY_NT_FOUND
private short[] skip
private byte[] read_byte
Constructor Detail |
---|
public BoundaryPushbackInputStream(java.io.PushbackInputStream inStream, byte[] boundary, int pushBackSize)
inStream
- boundary
- pushBackSize
- Method Detail |
---|
private final int readFromStream(byte[] b, int start, int length) throws java.io.IOException
b
- start
- length
-
java.io.IOException
private final int readFromStream(byte[] b) throws java.io.IOException
b
-
java.io.IOException
public int read(byte[] b) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
b
- is the array to read into.off
- is the offsetlen
-
java.io.IOException
private void unread() throws java.io.IOException
java.io.IOException
protected int boundaryPosition(byte[] searchbuf, int start, int end) throws java.io.IOException
searchbuf
- start
- end
-
java.io.IOException
public boolean getBoundaryStatus()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |