public class LineReaderInputStreamAdaptor extends LineReaderInputStream
InputStream used by the MIME parser to detect whether the
underlying data stream was used (read from) and whether the end of the
stream was reached.| Modifier and Type | Field and Description |
|---|---|
private LineReaderInputStream |
bis |
private boolean |
eof |
private int |
maxLineLen |
private boolean |
used |
| Constructor and Description |
|---|
LineReaderInputStreamAdaptor(java.io.InputStream is) |
LineReaderInputStreamAdaptor(java.io.InputStream is,
int maxLineLen) |
| Modifier and Type | Method and Description |
|---|---|
private int |
doReadLine(ByteArrayBuffer dst) |
boolean |
eof() |
boolean |
isUsed() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
int |
readLine(ByteArrayBuffer dst)
Reads one line of text into the given
ByteArrayBuffer. |
long |
skip(long count) |
java.lang.String |
toString() |
boolean |
unread(ByteArrayBuffer buf)
Tries to unread the last read line.
|
private final LineReaderInputStream bis
private final int maxLineLen
private boolean used
private boolean eof
public LineReaderInputStreamAdaptor(java.io.InputStream is,
int maxLineLen)
public LineReaderInputStreamAdaptor(java.io.InputStream is)
public int read()
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int readLine(ByteArrayBuffer dst) throws MaxLineLimitException, java.io.IOException
LineReaderInputStreamByteArrayBuffer.readLine in class LineReaderInputStreamdst - Destination-1 if the end of
the stream has been reached.MaxLineLimitException - if the line exceeds a limit on
the line length imposed by a subclass.java.io.IOException - in case of an I/O error.private int doReadLine(ByteArrayBuffer dst) throws MaxLineLimitException, java.io.IOException
MaxLineLimitExceptionjava.io.IOExceptionpublic boolean eof()
public boolean isUsed()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean unread(ByteArrayBuffer buf)
LineReaderInputStreamunread in class LineReaderInputStreampublic long skip(long count)
throws java.io.IOException
skip in class java.io.FilterInputStreamjava.io.IOException