java.lang.Object
java.io.InputStream
org.jvnet.mimepull.ChunkInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
Constructs a InputStream from a linked list of
Chunk
s.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
Field Details
-
current
Chunk current -
offset
int offset -
len
int len -
msg
-
part
-
buf
byte[] buf
-
-
Constructor Details
-
ChunkInputStream
-
-
Method Details
-
read
public int read(byte[] b, int off, int sz) - Overrides:
read
in classInputStream
-
read
public int read()- Specified by:
read
in classInputStream
-
fetch
private boolean fetch()Gets to the next chunk if we are done with the current one. -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-