Class LineReaderInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.james.mime4j.io.LineReaderInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
- Direct Known Subclasses:
BufferedLineReaderInputStream, LineReaderInputStreamAdaptor, MimeBoundaryInputStream
Input stream capable of reading lines of text.
-
Field Summary
Fields inherited from class FilterInputStream
in -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract intreadLine(ByteArrayBuffer dst) Reads one line of text into the givenByteArrayBuffer.abstract booleanunread(ByteArrayBuffer buf) Tries to unread the last read line.abstract booleanMethods inherited from class FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skip
-
Constructor Details
-
LineReaderInputStream
-
-
Method Details
-
readLine
Reads one line of text into the givenByteArrayBuffer.- Parameters:
dst- Destination- Returns:
- number of bytes copied or
-1if the end of the stream has been reached. - Throws:
MaxLineLimitException- if the line exceeds a limit on the line length imposed by a subclass.IOException- in case of an I/O error.
-
unread
Tries to unread the last read line. Implementation may refuse to unread a new buffer until the previous unread one has been competely consumed. Implementations will directly use the byte array backed by buf, so make sure to not alter it anymore once this method has been called.- Returns:
- true if the unread has been succesfull.
-
unread
-