org.apache.james.mime4j.io
public class MimeBoundaryInputStream extends LineReaderInputStream
isLastPart()
can be used to determine if a final boundary has been seen or not.Constructor and Description |
---|
MimeBoundaryInputStream(BufferedLineReaderInputStream inbuffer,
java.lang.String boundary)
Creates a new MimeBoundaryInputStream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the underlying stream.
|
boolean |
eof() |
boolean |
isLastPart() |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
int |
readLine(ByteArrayBuffer dst)
Reads one line of text into the given
ByteArrayBuffer . |
java.lang.String |
toString() |
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 longjava.io.IOException
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 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.java.io.IOException
- in case of an I/O error.public boolean isLastPart()
public boolean eof()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2004-2016. All Rights Reserved.