|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
HTTPClient.BufferedInputStream
This class is similar to java.io.BufferedInputStream, except that it fixes certain bugs and provides support for finding multipart boundaries.
Note: none of the methods here are synchronized because we assume the caller is already taking care of that.
| Field Summary |
| Fields inherited from class java.io.FilterInputStream |
in |
| Constructor Summary | |
(package private) |
BufferedInputStream(InputStream stream)
Create a new BufferedInputStream around the given input stream. |
| Method Summary | |
int |
available()
|
(package private) void |
markForSearch()
Mark the current read position so that we can start searching for the end boundary. |
(package private) int |
pastEnd(byte[] search,
int[] search_cmp)
Figures out how many bytes past the end of the multipart we read. |
int |
read()
Read a single byte. |
int |
read(byte[] buf,
int off,
int len)
Read a buffer full. |
long |
skip(long n)
Skip the given number of bytes in the stream. |
| Methods inherited from class java.io.FilterInputStream |
close, mark, markSupported, read, reset |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
BufferedInputStream(InputStream stream)
stream - the underlying input stream to use| Method Detail |
public int read()
throws IOException
IOException - if thrown by the underlying stream
public int read(byte[] buf,
int off,
int len)
throws IOException
buf - the buffer to read intooff - the offset within buf at which to start writinglen - the number of bytes to read
IOException - if thrown by the underlying stream
public long skip(long n)
throws IOException
n - the number of bytes to skip
IOException - if thrown by the underlying stream
public int available()
throws IOException
IOException - if the buffer is empty and the underlying stream has been
closedvoid markForSearch()
int pastEnd(byte[] search,
int[] search_cmp)
search - the search string (end boundary)search_cmp - the compiled info of the search string
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||