|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
wt.wrmf.transport.ChunkInputStream
ChunkInputStream accepts a "large" input stream and devides it into chunks
of input stream
with chunk size specified in the constructor.
The previous chunk will be kept in a temporary memory,
it can be recovered by calling rollback()
or deleted by calling commit ().
Supported API: false
Extendable: false
Field Summary | |
private int |
chunkLength
|
private static String |
CLASSNAME
|
private long |
committedChunkCount
|
private byte[] |
data
|
private InputStream |
is
|
private int |
position
|
private static String |
RESOURCE
|
private static String |
versionID
|
Fields inherited from class java.io.InputStream |
|
Constructor Summary | |
ChunkInputStream(InputStream is)
Supported API: false |
|
ChunkInputStream(InputStream is,
int chunkSize)
Supported API: false |
Method Summary | |
long |
getCommittedChunks()
Get the number of chunks committed by now. |
InputStream |
getNextChunk()
Get the next chunk of inputstream with length equals the chunk size, unless it has no more bytes. |
int |
read()
Supported API: false |
void |
rollback()
If called, the current chunk (inputstream) will be "rollback" as if it has never been read. |
long |
skip(long n)
Skip exactly n bytes. |
Methods inherited from class java.io.InputStream |
available, close, mark, markSupported, read, read, reset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private InputStream is
private int chunkLength
private static final String versionID
private byte[] data
private long committedChunkCount
private int position
Constructor Detail |
public ChunkInputStream(InputStream is, int chunkSize)
is
- chunkSize
- public ChunkInputStream(InputStream is)
is
- Method Detail |
public int read() throws IOException
IOException
public void rollback() throws IOException
IOException
public InputStream getNextChunk() throws IOException
IOException
public long getCommittedChunks()
public long skip(long n) throws IOException
n
-
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |