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 LittleEndianInputpublic byte readByte()
readByte in interface LittleEndianInputpublic int readUByte()
readUByte in interface LittleEndianInputpublic short readShort()
readShort in interface LittleEndianInputpublic int readUShort()
readUShort in interface LittleEndianInputpublic int readInt()
readInt in interface LittleEndianInputpublic long readLong()
readLong in interface LittleEndianInputpublic double readDouble()
readDouble in interface LittleEndianInputpublic void readFully(byte[] buf)
readFully in interface LittleEndianInputpublic void readFully(byte[] buf,
int off,
int len)
readFully in interface LittleEndianInputCopyright © 2020. All rights reserved.