public abstract class Chunk
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.io.DataInputStream |
_dstream |
protected ModuleBase |
_module |
protected long |
bytesLeft |
Constructor and Description |
---|
Chunk(ModuleBase module,
ChunkHeader hdr,
java.io.DataInputStream dstrm)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
byteBufString(byte[] b)
Convert a byte buffer cleanly to an ASCII string.
|
abstract boolean |
readChunk(RepInfo info)
Reads a chunk and puts appropriate information into
the RepInfo object.
|
protected ModuleBase _module
protected long bytesLeft
protected java.io.DataInputStream _dstream
public Chunk(ModuleBase module, ChunkHeader hdr, java.io.DataInputStream dstrm)
module
- The Module under which this was calledhdr
- The header for this chunkdstrm
- The stream from which the data are being readpublic abstract boolean readChunk(RepInfo info) throws java.io.IOException
info
- RepInfo object to receive informationfalse
if the chunk is structurally
invalid, otherwise true
java.io.IOException
protected java.lang.String byteBufString(byte[] b)