org.apache.james.mime4j.io
Class LineReaderInputStreamAdaptor
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.james.mime4j.io.LineReaderInputStream
org.apache.james.mime4j.io.LineReaderInputStreamAdaptor
- All Implemented Interfaces:
- Closeable
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.
LineReaderInputStreamAdaptor
public LineReaderInputStreamAdaptor(InputStream is,
int maxLineLen)
LineReaderInputStreamAdaptor
public LineReaderInputStreamAdaptor(InputStream is)
read
public int read()
throws IOException
- Overrides:
read
in class FilterInputStream
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read
in class FilterInputStream
- Throws:
IOException
readLine
public int readLine(ByteArrayBuffer dst)
throws IOException
- Description copied from class:
LineReaderInputStream
- Reads one line of text into the given
ByteArrayBuffer
.
- Specified by:
readLine
in class LineReaderInputStream
- Parameters:
dst
- Destination
- Returns:
- number of bytes copied or
-1
if the end of
the stream has been reached.
- Throws:
IOException
- in case of an I/O error.
eof
public boolean eof()
isUsed
public boolean isUsed()
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2004-2012 JBoss by Red Hat. All Rights Reserved.