- java.lang.Object
-
- java.io.InputStream
-
- org.jvnet.mimepull.DataHead.ReadMultiStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Direct Known Subclasses:
DataHead.ReadOnceStream
- Enclosing class:
- DataHead
class DataHead.ReadMultiStream extends java.io.InputStream
-
-
Constructor Summary
Constructors Constructor Description ReadMultiStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidadjustInMemoryUsage()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
-
buf
byte[] buf
-
closed
boolean closed
-
-
Method Detail
-
read
public int read(byte[] b, int off, int sz) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
adjustInMemoryUsage
void adjustInMemoryUsage()
-
fetch
private boolean fetch() throws java.io.IOExceptionGets to the next chunk if we are done with the current one.- Returns:
- true if any data available
- Throws:
java.io.IOException- when i/o error
-
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
-
-