Save This Page
Home » poi-src-3.2-FINAL-20081019 » org.apache » poi » hssf » record » [javadoc | source]
org.apache.poi.hssf.record
public class: RecordInputStream [javadoc | source]
java.lang.Object
   java.io.InputStream
      org.apache.poi.hssf.record.RecordInputStream

All Implemented Interfaces:
    Closeable

Direct Known Subclasses:
    BiffviewRecordInputStream

Title: Record Input Stream

Description: Wraps a stream and provides helper methods for the construction of records.

Field Summary
public static final  short MAX_RECORD_DATA_SIZE    Maximum size of a single record (minus the 4 byte header) without a continue 
protected  short currentSid     
protected  short currentLength     
protected  short nextSid     
protected  byte[] data     
protected  short recordOffset     
protected  long pos     
 byte[] NAN_data     
Constructor:
 public RecordInputStream(InputStream in) throws RecordFormatException 
Method from org.apache.poi.hssf.record.RecordInputStream Summary:
checkRecordPosition,   getAutoContinue,   getLength,   getNANData,   getPos,   getRecordOffset,   getSid,   hasNextRecord,   isContinueNext,   nextRecord,   read,   readAllContinuedRemainder,   readByte,   readCompressedUnicode,   readDouble,   readInt,   readLong,   readRemainder,   readShort,   readShortArray,   readUByte,   readUShort,   readUnicodeLEString,   readUnicodeString,   remaining,   setAutoContinue
Methods from java.io.InputStream:
available,   close,   mark,   markSupported,   read,   read,   read,   reset,   skip
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.poi.hssf.record.RecordInputStream Detail:
 protected  void checkRecordPosition() 
 public boolean getAutoContinue() 
 public short getLength() 
 public byte[] getNANData() 
 public long getPos() 
 public short getRecordOffset() 
 public short getSid() 
 public boolean hasNextRecord() 
 public boolean isContinueNext() 
    Returns true iif a Continue record is next in the excel stream
 public  void nextRecord() throws RecordFormatException 
    Moves to the next record in the stream. Note: The auto continue flag is reset to true
 public int read() throws IOException 
    This method will read a byte from the current record
 public byte[] readAllContinuedRemainder() 
Deprecated! Best - to write a 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 readByte() 
    Reads an 8 bit, signed value
 public String readCompressedUnicode(int length) 
 public double readDouble() 
 public int readInt() 
 public long readLong() 
 public byte[] readRemainder() 
    Returns the remaining bytes for the current record.
 public short readShort() 
    Reads a 16 bit, signed value
 public short[] readShortArray() 
 public short readUByte() 
    Reads an 8 bit, unsigned value
 public int readUShort() 
    Reads a 16 bit,un- signed value.
 public String readUnicodeLEString(int length) 
    given a byte array of 16-bit unicode characters, compress to 8-bit and return a string { 0x16, 0x00 } -0x16
 public UnicodeString readUnicodeString() 
    Returns an excel style unicode string from the bytes reminaing in the record. Note: Unicode strings differ from normal strings due to the addition of formatting information.
 public int remaining() 
    The remaining number of bytes in the current record.
 public  void setAutoContinue(boolean enable)