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.
Two attachments to Bugzilla 50779
demonstrate that a CONTINUE break can appear right in between two bytes of a unicode character
or between two bytes of a 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
blocks of a UnicodeString.
| Modifier and Type | Field and Description |
|---|---|
| private final RecordInputStream |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public byte | |
| public double | |
| public void | |
| public void | |
| public int | |
| public long | |
| public void | readPlain(byte[]
the byte array to receive the bytes buf, int the start offset into the byte array off, int the amount of bytes to fill len)Implements org. Usually acts the same as |
| public short | |
| public int | |
| public int |
| _in | back to summary |
|---|---|
| private final RecordInputStream _in | |
| ContinuableRecordInput | back to summary |
|---|---|
| public ContinuableRecordInput(RecordInputStream in) | |
| available | back to summary |
|---|---|
| public int available() Implements org.
| |
| readByte | back to summary |
|---|---|
| public byte readByte() Implements org.
| |
| readDouble | back to summary |
|---|---|
| public double readDouble() Implements org.
| |
| readFully | back to summary |
|---|---|
| public void readFully(byte[] buf) Implements org.
| |
| readFully | back to summary |
|---|---|
| public void readFully(byte[] buf, int off, int len) Implements org.
| |
| readInt | back to summary |
|---|---|
| public int readInt() Implements org.
| |
| readLong | back to summary |
|---|---|
| public long readLong() Implements org.
| |
| readPlain | back to summary |
|---|---|
| public void readPlain(byte[] buf, int off, int len) Implements org. Doc from org. Usually acts the same as
| |
| readShort | back to summary |
|---|---|
| public short readShort() Implements org.
| |
| readUByte | back to summary |
|---|---|
| public int readUByte() Implements org.
| |
| readUShort | back to summary |
|---|---|
| public int readUShort() Implements org.
| |