|
||||||||||
| 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 Closeableclose in class FilterInputStreamIOException - on I/O errors.public boolean markSupported()
markSupported in class FilterInputStreamInputStream.markSupported()
public boolean readAllowed()
throws IOException
IOException
public int read()
throws IOException
read in class FilterInputStreamIOExceptionInputStream.read()
public int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIOException
public int readLine(ByteArrayBuffer dst)
throws 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.
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 Objectpublic 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 | |||||||||