| Modifier and Type | Class and Description |
|---|---|
| public static class | RecordInputStream.
For use in BiffViewer which may construct |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final BiffHeaderInput | _bhi
Header |
| private int | _currentDataLength
Length of the data section of the current BIFF record (always 4 less than the total record size). |
| private int | _currentDataOffset
index within the data section of the current BIFF record |
| private int | _currentSid
the record identifier of the BIFF record currently being read |
| private final LittleEndianInput | _dataInput
Data |
| private int | _markedDataOffset
index within the data section when mark() was called |
| private int | _nextSid
The BIFF record identifier for the next record is read when just as the current record is finished. |
| private static final int | DATA_LEN_NEEDS_TO_BE_READ
When |
| private static final byte[] | |
| private static final int | |
| public static final short | MAX_RECORD_DATA_SIZE
Maximum size of a single record (minus the 4 byte header) without a continue |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: the number of bytes available in the current BIFF recordImplements org.
|
| private void | |
| public int | |
| public short | |
| public boolean | Returns: true, if there's another record in the streamNote - this method is expected to be called only when completed reading the current BIFF record. |
| private boolean | |
| public boolean | |
| public void | |
| public void | |
| public int | |
| public byte[] | Returns: all byte data for the current record
Deprecated
POI 2.0 Best to write an input stream that wraps this one
where there is special sub record that may overlap continue
records.
Reads all byte data for the current record, including any that overlaps into any following continue records. |
| public byte | |
| public String | |
| public double | |
| public void | |
| public void | |
| private void | |
| public int | |
| public long | |
| private int | |
| 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 byte[] | Returns: The remaining bytes of the current record.Returns the remaining bytes for the current record. |
| public short | |
| public String | |
| private String | |
| public int | readUByte()
Implements org. Reads an 8 bit, unsigned value |
| public String | Returns: the converted stringthe length of the final string requestedLength)given a byte array of 16-bit unicode characters, compress to 8-bit and return a string { 0x16, 0x00 } -0x16 |
| public int | readUShort()
Implements org. Reads a 16 bit, unsigned value. |
| public int | Returns: The number of bytes remaining in the current recordThe remaining number of bytes in the current record. |
| public void |
| _bhi | back to summary |
|---|---|
| private final BiffHeaderInput _bhi Header | |
| _currentDataLength | back to summary |
|---|---|
| private int _currentDataLength Length of the data section of the current BIFF record (always 4 less than the total record size).
When uninitialised, this field is set to | |
| _currentDataOffset | back to summary |
|---|---|
| private int _currentDataOffset index within the data section of the current BIFF record | |
| _currentSid | back to summary |
|---|---|
| private int _currentSid the record identifier of the BIFF record currently being read | |
| _dataInput | back to summary |
|---|---|
| private final LittleEndianInput _dataInput Data | |
| _markedDataOffset | back to summary |
|---|---|
| private int _markedDataOffset index within the data section when mark() was called | |
| _nextSid | back to summary |
|---|---|
| private int _nextSid The BIFF record identifier for the next record is read when just as the current record
is finished.
This field is only really valid during the time that ( | |
| DATA_LEN_NEEDS_TO_BE_READ | back to summary |
|---|---|
| private static final int DATA_LEN_NEEDS_TO_BE_READ When | |
| EMPTY_BYTE_ARRAY | back to summary |
|---|---|
| private static final byte[] EMPTY_BYTE_ARRAY | |
| INVALID_SID_VALUE | back to summary |
|---|---|
| private static final int INVALID_SID_VALUE | |
| MAX_RECORD_DATA_SIZE | back to summary |
|---|---|
| public static final short MAX_RECORD_DATA_SIZE Maximum size of a single record (minus the 4 byte header) without a continue | |
| RecordInputStream | back to summary |
|---|---|
| public RecordInputStream(InputStream in) throws RecordFormatException | |
| RecordInputStream | back to summary |
|---|---|
| public RecordInputStream(InputStream in, EncryptionInfo key, int initialOffset) throws RecordFormatException | |
| available | back to summary |
|---|---|
| public int available() Implements org.
| |
| checkRecordPosition | back to summary |
|---|---|
| private void checkRecordPosition(int requiredByteCount) | |
| getNextSid | back to summary |
|---|---|
public int getNextSid()
| |
| getSid | back to summary |
|---|---|
| public short getSid() | |
| hasNextRecord | back to summary |
|---|---|
| public boolean hasNextRecord() throws LeftoverDataException Note - this method is expected to be called only when completed reading the current BIFF record.
| |
| isContinueNext | back to summary |
|---|---|
private boolean isContinueNext()
| |
| isEncrypted | back to summary |
|---|---|
public boolean isEncrypted()
| |
| mark | back to summary |
|---|---|
| public void mark(int readlimit) Mark the stream position - experimental function
| |
| nextRecord | back to summary |
|---|---|
| public void nextRecord() throws RecordFormatException Moves to the next record in the stream. Note The auto continue flag is reset to true | |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) | |
| readAllContinuedRemainder | back to summary |
|---|---|
| public byte[] readAllContinuedRemainder()
Deprecated POI 2.0 Best to write an input stream that wraps this one where there is special sub record that may overlap continue records. Reads all byte data for the current record, including any that overlaps into any following continue records.
| |
| readByte | back to summary |
|---|---|
| public byte readByte() Implements org. Reads an 8 bit, signed value
| |
| readCompressedUnicode | back to summary |
|---|---|
| public String readCompressedUnicode(int requestedLength) | |
| 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.
| |
| readFully | back to summary |
|---|---|
| private void readFully(byte[] buf, int off, int len, boolean isPlain) | |
| readInt | back to summary |
|---|---|
| public int readInt() Implements org. Reads a 32 bit, signed value
| |
| readLong | back to summary |
|---|---|
| public long readLong() Implements org. Reads a 64 bit, signed value
| |
| readNextSid | back to summary |
|---|---|
private int readNextSid()
| |
| readPlain | back to summary |
|---|---|
| public void readPlain(byte[] buf, int off, int len) Implements org. Doc from org. Usually acts the same as
| |
| readRemainder | back to summary |
|---|---|
| public byte[] readRemainder() Returns the remaining bytes for the current record.
| |
| readShort | back to summary |
|---|---|
| public short readShort() Implements org. Reads a 16 bit, signed value
| |
| readString | back to summary |
|---|---|
| public String readString() | |
| readStringCommon | back to summary |
|---|---|
| private String readStringCommon(int requestedLength, boolean pIsCompressedEncoding) | |
| readUByte | back to summary |
|---|---|
| public int readUByte() Implements org. Reads an 8 bit, unsigned value
| |
| readUnicodeLEString | back to summary |
|---|---|
| public String readUnicodeLEString(int requestedLength) given a byte array of 16-bit unicode characters, compress to 8-bit and return a string { 0x16, 0x00 } -0x16
| |
| readUShort | back to summary |
|---|---|
| public int readUShort() Implements org. Reads a 16 bit, unsigned value.
| |
| remaining | back to summary |
|---|---|
| public int remaining() The remaining number of bytes in the current record.
| |
| reset | back to summary |
|---|---|
| public void reset() throws IOException Resets the stream position to the previously marked position. Experimental function - this only works, when nextRecord() wasn't called in the meantime.
| |
Records that don't completely
read all available data. This exception should never be thrown otherwise.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static String |
| LeftoverDataException | back to summary |
|---|---|
| public LeftoverDataException(int sid, int remainingByteCount) | |
| getRecordName | back to summary |
|---|---|
| private static String getRecordName(int sid) | |
| Modifier and Type | Field and Description |
|---|---|
| private final LittleEndianInput |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public int | readDataSize()
Implements org. Read an unsigned short from the stream without decrypting |
| public int | readRecordSID()
Implements org. Read an unsigned short from the stream without decrypting |
| _lei | back to summary |
|---|---|
| private final LittleEndianInput _lei | |
| SimpleHeaderInput | back to summary |
|---|---|
| private SimpleHeaderInput(LittleEndianInput lei) | |
| available | back to summary |
|---|---|
| public int available() Implements org.
| |
| readDataSize | back to summary |
|---|---|
| public int readDataSize() Implements org. Doc from org. Read an unsigned short from the stream without decrypting
| |
| readRecordSID | back to summary |
|---|---|
| public int readRecordSID() Implements org. Doc from org. Read an unsigned short from the stream without decrypting
| |