|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
org.apache.poi.hssf.record.RecordInputStream
public final class RecordInputStream
Title: Record Input Stream
Description: Wraps a stream and provides helper methods for the construction of records.
Field Summary | |
---|---|
static short |
MAX_RECORD_DATA_SIZE
Maximum size of a single record (minus the 4 byte header) without a continue |
Constructor Summary | |
---|---|
RecordInputStream(java.io.InputStream in)
|
Method Summary | |
---|---|
boolean |
getAutoContinue()
|
short |
getLength()
|
long |
getPos()
|
short |
getRecordOffset()
|
short |
getSid()
|
boolean |
hasNextRecord()
|
boolean |
isContinueNext()
Returns true iif a Continue record is next in the excel stream |
void |
nextRecord()
Moves to the next record in the stream. |
int |
read()
This method will read a byte from the current record |
byte[] |
readAllContinuedRemainder()
Deprecated. Best to write a input stream that wraps this one where there is special sub record that may overlap continue records. |
byte |
readByte()
Reads an 8 bit, signed value |
java.lang.String |
readCompressedUnicode(int requestedLength)
|
double |
readDouble()
|
int |
readInt()
|
long |
readLong()
|
byte[] |
readRemainder()
Returns the remaining bytes for the current record. |
short |
readShort()
Reads a 16 bit, signed value |
java.lang.String |
readString()
|
short |
readUByte()
Reads an 8 bit, unsigned value |
java.lang.String |
readUnicodeLEString(int requestedLength)
given a byte array of 16-bit unicode characters, compress to 8-bit and return a string { 0x16, 0x00 } -0x16 |
UnicodeString |
readUnicodeString()
Returns an excel style unicode string from the bytes reminaing in the record. |
int |
readUShort()
Reads a 16 bit, unsigned value. |
int |
remaining()
The remaining number of bytes in the current record. |
void |
setAutoContinue(boolean enable)
|
Methods inherited from class java.io.InputStream |
---|
available, close, mark, markSupported, read, read, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final short MAX_RECORD_DATA_SIZE
Constructor Detail |
---|
public RecordInputStream(java.io.InputStream in) throws RecordFormatException
RecordFormatException
Method Detail |
---|
public int read()
read
in class java.io.InputStream
public short getSid()
public short getLength()
public short getRecordOffset()
public long getPos()
public boolean hasNextRecord()
public void nextRecord() throws RecordFormatException
RecordFormatException
public void setAutoContinue(boolean enable)
public boolean getAutoContinue()
public byte readByte()
public short readShort()
public int readInt()
public long readLong()
public short readUByte()
public int readUShort()
public double readDouble()
public java.lang.String readString()
public java.lang.String readUnicodeLEString(int requestedLength)
requestedLength
- the length of the final string
java.lang.IllegalArgumentException
- if len is too large (i.e.,
there is not enough data in string to create a String of that
length)public java.lang.String readCompressedUnicode(int requestedLength)
public UnicodeString readUnicodeString()
public byte[] readRemainder()
public byte[] readAllContinuedRemainder()
public int remaining()
public boolean isContinueNext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |