- java.lang.Object
-
- java.io.InputStream
-
- org.jvnet.mimepull.ChunkInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
final class ChunkInputStream extends java.io.InputStreamConstructs a InputStream from a linked list ofChunks.
-
-
Constructor Summary
Constructors Constructor Description ChunkInputStream(MIMEMessage msg, MIMEPart part, Chunk startPos)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()private booleanfetch()Gets to the next chunk if we are done with the current one.intread()intread(byte[] b, int off, int sz)
-
-
-
Field Detail
-
current
Chunk current
-
offset
int offset
-
len
int len
-
msg
final MIMEMessage msg
-
part
final MIMEPart part
-
buf
byte[] buf
-
-
Constructor Detail
-
ChunkInputStream
public ChunkInputStream(MIMEMessage msg, MIMEPart part, Chunk startPos)
-
-
Method Detail
-
read
public int read(byte[] b, int off, int sz)- Overrides:
readin classjava.io.InputStream
-
read
public int read()
- Specified by:
readin classjava.io.InputStream
-
fetch
private boolean fetch()
Gets to the next chunk if we are done with the current one.
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException
-
-