Documentation of 'org.apache.poi.hssf.record.RecordInputStream' Java class
RecordInputStream
org.apache.poi.hssf.record

Class RecordInputStream

  • All Implemented Interfaces:
    LittleEndianInput


    public final class RecordInputStream
    extends java.lang.Object
    implements LittleEndianInput
    Title: Record Input Stream

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

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static short MAX_RECORD_DATA_SIZE
      Maximum size of a single record (minus the 4 byte header) without a continue
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method and Description
      int available() 
      int getNextSid() 
      short getSid() 
      boolean hasNextRecord()
      Note - this method is expected to be called only when completed reading the current BIFF record.
      void nextRecord()
      Moves to the next record in the stream.
      int read(byte[] b, int off, int len) 
      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() 
      void readFully(byte[] buf) 
      void readFully(byte[] buf, int off, int len) 
      int readInt()
      Reads a 32 bit, signed value
      long readLong()
      Reads a 64 bit, signed value
      byte[] readRemainder()
      Returns the remaining bytes for the current record.
      short readShort()
      Reads a 16 bit, signed value
      java.lang.String readString() 
      int 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
      int readUShort()
      Reads a 16 bit, unsigned value.
      int remaining()
      The remaining number of bytes in the current record.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MAX_RECORD_DATA_SIZE

        public static final short MAX_RECORD_DATA_SIZE
        Maximum size of a single record (minus the 4 byte header) without a continue
        See Also:
        Constant Field Values
    • Method Detail

      • read

        public int read(byte[] b,
                        int off,
                        int len)
      • getSid

        public short getSid()
      • readString

        public java.lang.String readString()
      • readUnicodeLEString

        public 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
        Parameters:
        requestedLength - the length of the final string
        Returns:
        the converted string
        Throws:
        java.lang.IllegalArgumentException - if len is too large (i.e., there is not enough data in string to create a String of that length)
      • readCompressedUnicode

        public java.lang.String readCompressedUnicode(int requestedLength)
      • readRemainder

        public byte[] readRemainder()
        Returns the remaining bytes for the current record.
        Returns:
        The remaining bytes of the current record.
      • readAllContinuedRemainder

        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.
      • remaining

        public int remaining()
        The remaining number of bytes in the current record.
        Returns:
        The number of bytes remaining in the current record
      • getNextSid

        public int getNextSid()
        Returns:
        sid of next record. Can be called after hasNextRecord()

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.