public class ContinuableRecordInput extends Object implements LittleEndianInput
RecordInputStream
that can read primitive data types
(short, int, long, etc.) spanned across a ContinueRecord
boundary.
Most records construct themselves from RecordInputStream
.
This class assumes that a ContinueRecord
record break always occurs at the type boundary,
however, it is not always so.
short
. The problematic portion of the data is
in a Asian Phonetic Settings Block (ExtRst) of a UnicodeString.
RecordInputStream
greedily requests the bytes to be read and stumbles on such files with a
"Not enough data (1) to read requested (2) bytes" exception. The ContinuableRecordInput
class circumvents this "type boundary" rule and reads data byte-by-byte rolling over CONTINUE if necessary.
YK: For now (March 2011) this class is only used to read
Constructor and Description |
---|
ContinuableRecordInput(RecordInputStream in) |
Modifier and Type | Method and Description |
---|---|
int |
available() |
byte |
readByte() |
double |
readDouble() |
void |
readFully(byte[] buf) |
void |
readFully(byte[] buf,
int off,
int len) |
int |
readInt() |
long |
readLong() |
short |
readShort() |
int |
readUByte() |
int |
readUShort() |
public ContinuableRecordInput(RecordInputStream in)
public int available()
available
in interface LittleEndianInput
public byte readByte()
readByte
in interface LittleEndianInput
public int readUByte()
readUByte
in interface LittleEndianInput
public short readShort()
readShort
in interface LittleEndianInput
public int readUShort()
readUShort
in interface LittleEndianInput
public int readInt()
readInt
in interface LittleEndianInput
public long readLong()
readLong
in interface LittleEndianInput
public double readDouble()
readDouble
in interface LittleEndianInput
public void readFully(byte[] buf)
readFully
in interface LittleEndianInput
public void readFully(byte[] buf, int off, int len)
readFully
in interface LittleEndianInput
Copyright © 2020. All rights reserved.