|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
org.apache.james.mime4j.MimeBoundaryInputStream
public class MimeBoundaryInputStream
Stream that constrains itself to a single MIME body part.
After the stream ends (i.e. read() returns -1) hasMoreParts()
can be used to determine if a final boundary has been seen or not.
If parentEOF() is true an unexpected end of stream
has been detected in the parent stream.
| Constructor Summary | |
|---|---|
MimeBoundaryInputStream(java.io.InputStream s,
java.lang.String boundary)
Creates a new MimeBoundaryInputStream. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the underlying stream. |
void |
consume()
Consumes all unread bytes of this stream. |
boolean |
hasMoreParts()
Determines if the underlying stream has more parts (this stream has not seen an end boundary). |
boolean |
parentEOF()
Determines if the parent stream has reached EOF |
int |
read()
|
| Methods inherited from class java.io.InputStream |
|---|
available, mark, markSupported, read, read, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MimeBoundaryInputStream(java.io.InputStream s,
java.lang.String boundary)
throws java.io.IOException
s - The underlying stream.boundary - Boundary string (not including leading hyphens).
java.io.IOException| Method Detail |
|---|
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.InputStreamjava.io.IOException - on I/O errors.public boolean hasMoreParts()
true if there are more parts in the underlying
stream, false otherwise.public boolean parentEOF()
true if EOF has been reached for the parent stream,
false otherwise.
public void consume()
throws java.io.IOException
java.io.IOException - on I/O errors.
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionInputStream.read()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||