Top Description Fields Constructors Methods
org.apache.poi.hssf.record.cont

public Class ContinuableRecordInput

extends Object
implements LittleEndianInput
Class Inheritance
All Implemented Interfaces
org.apache.poi.util.LittleEndianInput
Imports
org.apache.poi.hssf.record.ContinueRecord, .RecordInputStream, org.apache.poi.util.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.

Field Summary

Modifier and TypeField and Description
private final RecordInputStream

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
public byte
public double
public void
public void
readFully(byte[] buf, int off, int len)

Implements org.apache.poi.util.LittleEndianInput.readFully.

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.apache.poi.util.LittleEndianInput.readPlain.

Usually acts the same as readFully(byte[], int, int), but for an encrypted stream the raw (unencrypted) data is filled

public short
public int
public int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_inback to summary
private final RecordInputStream _in

Constructor Detail

ContinuableRecordInputback to summary
public ContinuableRecordInput(RecordInputStream in)

Method Detail

availableback to summary
public int available()

Implements org.apache.poi.util.LittleEndianInput.available.

Annotations
@Override
readByteback to summary
public byte readByte()

Implements org.apache.poi.util.LittleEndianInput.readByte.

Annotations
@Override
readDoubleback to summary
public double readDouble()

Implements org.apache.poi.util.LittleEndianInput.readDouble.

Annotations
@Override
readFullyback to summary
public void readFully(byte[] buf)

Implements org.apache.poi.util.LittleEndianInput.readFully.

Annotations
@Override
readFullyback to summary
public void readFully(byte[] buf, int off, int len)

Implements org.apache.poi.util.LittleEndianInput.readFully.

Annotations
@Override
readIntback to summary
public int readInt()

Implements org.apache.poi.util.LittleEndianInput.readInt.

Annotations
@Override
readLongback to summary
public long readLong()

Implements org.apache.poi.util.LittleEndianInput.readLong.

Annotations
@Override
readPlainback to summary
public void readPlain(byte[] buf, int off, int len)

Implements org.apache.poi.util.LittleEndianInput.readPlain.

Doc from org.apache.poi.util.LittleEndianInput.readPlain.

Usually acts the same as readFully(byte[], int, int), but for an encrypted stream the raw (unencrypted) data is filled

Parameters
buf:byte[]

the byte array to receive the bytes

off:int

the start offset into the byte array

len:int

the amount of bytes to fill

Annotations
@Override
readShortback to summary
public short readShort()

Implements org.apache.poi.util.LittleEndianInput.readShort.

Annotations
@Override
readUByteback to summary
public int readUByte()

Implements org.apache.poi.util.LittleEndianInput.readUByte.

Annotations
@Override
readUShortback to summary
public int readUShort()

Implements org.apache.poi.util.LittleEndianInput.readUShort.

Annotations
@Override