|
||||||||||
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,
java.lang.String boundary)
Creates a new MimeBoundaryInputStream. |
|
MimeBoundaryInputStream(BufferedLineReaderInputStream inbuffer,
java.lang.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 . |
java.lang.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, java.lang.String boundary, boolean strict) throws java.io.IOException
inbuffer
- The underlying stream.boundary
- Boundary string (not including leading hyphens).
java.lang.IllegalArgumentException
- when boundary is too long
java.io.IOException
public MimeBoundaryInputStream(BufferedLineReaderInputStream inbuffer, java.lang.String boundary) throws java.io.IOException
inbuffer
- The underlying stream.boundary
- Boundary string (not including leading hyphens).
java.lang.IllegalArgumentException
- when boundary is too long
java.io.IOException
Method Detail |
---|
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.FilterInputStream
java.io.IOException
- on I/O errors.public boolean markSupported()
markSupported
in class java.io.FilterInputStream
InputStream.markSupported()
public boolean readAllowed() throws java.io.IOException
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
InputStream.read()
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int readLine(ByteArrayBuffer dst) throws java.io.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.
java.io.IOException
- in case of an I/O error.public boolean isEmptyStream()
public boolean isFullyConsumed()
public boolean isLastPart()
public boolean eof()
public java.lang.String toString()
toString
in class java.lang.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 |