public class MimeBoundaryInputStream extends LineReaderInputStream
isLastPart()
can be used to determine if a final boundary has been seen or not.in
Constructor and Description |
---|
MimeBoundaryInputStream(BufferedLineReaderInputStream inbuffer,
String boundary)
Creates a new MimeBoundaryInputStream.
|
MimeBoundaryInputStream(BufferedLineReaderInputStream inbuffer,
String boundary,
boolean strict)
Creates a new MimeBoundaryInputStream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the underlying stream.
|
boolean |
eof() |
boolean |
isEmptyStream() |
boolean |
isFullyConsumed() |
boolean |
isLastPart() |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
boolean |
readAllowed() |
int |
readLine(ByteArrayBuffer dst)
Reads one line of text into the given
ByteArrayBuffer . |
String |
toString() |
boolean |
unread(ByteArrayBuffer buf)
Tries to unread the last read line.
|
public MimeBoundaryInputStream(BufferedLineReaderInputStream inbuffer, String boundary, boolean strict) throws IOException
inbuffer
- The underlying stream.boundary
- Boundary string (not including leading hyphens).IllegalArgumentException
- when boundary is too longIOException
public MimeBoundaryInputStream(BufferedLineReaderInputStream inbuffer, String boundary) throws IOException
inbuffer
- The underlying stream.boundary
- Boundary string (not including leading hyphens).IllegalArgumentException
- when boundary is too longIOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterInputStream
IOException
- on I/O errors.public boolean markSupported()
markSupported
in class FilterInputStream
InputStream.markSupported()
public boolean readAllowed() throws IOException
IOException
public int read() throws IOException
read
in class FilterInputStream
IOException
InputStream.read()
public int read(byte[] b, int off, int len) throws IOException
read
in class FilterInputStream
IOException
public int readLine(ByteArrayBuffer dst) throws IOException
LineReaderInputStream
ByteArrayBuffer
.readLine
in class LineReaderInputStream
dst
- 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.IOException
- in case of an I/O error.public boolean isEmptyStream()
public boolean isFullyConsumed()
public boolean isLastPart()
public boolean eof()
public boolean unread(ByteArrayBuffer buf)
LineReaderInputStream
unread
in class LineReaderInputStream
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.