Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.hssf.record.cont
Class ContinuableRecordInput

    java.lang.Object
      org.apache.poi.hssf.record.cont.ContinuableRecordInput

All Implemented Interfaces:
  LittleEndianInput

    public class ContinuableRecordInput

extends java.lang.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

Author:
  Yegor Kozlov

Constructor Summary
`ContinuableRecordInput(RecordInputStream in)`

Method Summary
`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()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ContinuableRecordInput

    public ContinuableRecordInput(RecordInputStream in)

Method Detail

### available

    public int available()

  Specified by:
    `available` in interface `LittleEndianInput`

### readByte

    public byte readByte()

  Specified by:
    `readByte` in interface `LittleEndianInput`

### readUByte

    public int readUByte()

  Specified by:
    `readUByte` in interface `LittleEndianInput`

### readShort

    public short readShort()

  Specified by:
    `readShort` in interface `LittleEndianInput`

### readUShort

    public int readUShort()

  Specified by:
    `readUShort` in interface `LittleEndianInput`

### readInt

    public int readInt()

  Specified by:
    `readInt` in interface `LittleEndianInput`

### readLong

    public long readLong()

  Specified by:
    `readLong` in interface `LittleEndianInput`

### readDouble

    public double readDouble()

  Specified by:
    `readDouble` in interface `LittleEndianInput`

### readFully

    public void readFully(byte[] buf)

  Specified by:
    `readFully` in interface `LittleEndianInput`

### readFully

    public void readFully(byte[] buf,
                          int off,
                          int len)

  Specified by:
    `readFully` in interface `LittleEndianInput`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD