public class DeChunkedInputStream
extends java.io.InputStream
Modifier and Type | Class and Description |
---|---|
protected static class |
DeChunkedInputStream.Chunk |
static class |
DeChunkedInputStream.State |
Modifier and Type | Field and Description |
---|---|
protected boolean |
checksumming |
protected DeChunkedInputStream.Chunk |
chunk |
protected long |
crc32 |
protected java.util.zip.Checksum |
crc32alg |
protected java.lang.String |
dmrtext |
protected java.lang.String |
errortext |
protected RequestMode |
mode |
protected java.nio.ByteOrder |
remoteorder |
protected DeChunkedInputStream.State |
state |
Constructor and Description |
---|
DeChunkedInputStream(java.io.InputStream src,
RequestMode mode) |
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
void |
computeChecksum(byte[] b,
int offset,
int extent) |
void |
computeChecksum(int b) |
long |
endChecksum() |
byte[] |
getCurrentChunk() |
java.lang.String |
getDMRText() |
java.lang.String |
getErrorText() |
java.nio.ByteOrder |
getRemoteOrder() |
DeChunkedInputStream.State |
getState() |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
protected int |
readChunk(DeChunkedInputStream.Chunk chunk) |
protected int |
readDMR(DeChunkedInputStream.Chunk chunk) |
protected boolean |
readHeader(DeChunkedInputStream.Chunk chunk)
Read the size+flags header from the input source and use it to
initialize the chunk state
|
void |
reset() |
long |
skip(long n) |
void |
startChecksum() |
protected RequestMode mode
protected java.nio.ByteOrder remoteorder
protected DeChunkedInputStream.State state
protected DeChunkedInputStream.Chunk chunk
protected java.util.zip.Checksum crc32alg
protected long crc32
protected boolean checksumming
protected java.lang.String errortext
protected java.lang.String dmrtext
public DeChunkedInputStream(java.io.InputStream src, RequestMode mode) throws java.io.IOException
java.io.IOException
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
public void mark(int readlimit)
mark
in class java.io.InputStream
public void reset() throws java.io.IOException
reset
in class java.io.InputStream
java.io.IOException
public boolean markSupported()
markSupported
in class java.io.InputStream
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
java.io.IOException
public DeChunkedInputStream.State getState()
public java.lang.String getErrorText()
public java.lang.String getDMRText()
public byte[] getCurrentChunk() throws java.io.IOException
java.io.IOException
public java.nio.ByteOrder getRemoteOrder()
protected int readChunk(DeChunkedInputStream.Chunk chunk) throws java.io.IOException
java.io.IOException
protected int readDMR(DeChunkedInputStream.Chunk chunk) throws java.io.IOException
java.io.IOException
protected boolean readHeader(DeChunkedInputStream.Chunk chunk) throws java.io.IOException
java.io.IOException
public void startChecksum()
public void computeChecksum(byte[] b, int offset, int extent)
public void computeChecksum(int b)
public long endChecksum()