Class ContinuableRecordInput

  • All Implemented Interfaces:
    LittleEndianInput

    public class ContinuableRecordInput
    extends Object
    implements LittleEndianInput
    A decorated 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

    See Also:
    blocks of a UnicodeString.