Package org.jvnet.mimepull
Class DataHead.ReadMultiStream
- 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) void
adjustInMemoryUsage()
void
close()
private boolean
fetch()
Gets to the next chunk if we are done with the current one.int
read()
int
read(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:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException
- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
adjustInMemoryUsage
void adjustInMemoryUsage()
-
fetch
private boolean fetch() throws java.io.IOException
Gets 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:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
- Throws:
java.io.IOException
-
-