|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
org.apache.james.mime4j.io.LineReaderInputStream
org.apache.james.mime4j.io.MimeBoundaryInputStream
public class MimeBoundaryInputStream
Stream that constrains itself to a single MIME body part.
After the stream ends (i.e. read() returns -1) isLastPart()
can be used to determine if a final boundary has been seen or not.
Field Summary |
---|
Fields inherited from class java.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
MimeBoundaryInputStream(BufferedLineReaderInputStream inbuffer,
String boundary)
Creates a new MimeBoundaryInputStream. |
|
MimeBoundaryInputStream(BufferedLineReaderInputStream inbuffer,
String boundary,
boolean strict)
Creates a new MimeBoundaryInputStream. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.io.FilterInputStream |
---|
available, mark, read, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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 long
IOException
public MimeBoundaryInputStream(BufferedLineReaderInputStream inbuffer, String boundary) throws IOException
inbuffer
- The underlying stream.boundary
- Boundary string (not including leading hyphens).
IllegalArgumentException
- when boundary is too long
IOException
Method Detail |
---|
public void close() throws IOException
close
in interface Closeable
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 String toString()
toString
in class Object
public boolean unread(ByteArrayBuffer buf)
LineReaderInputStream
unread
in class LineReaderInputStream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |