org.apache.poi.hssf.record
Class UnknownRecord

java.lang.Object
  |
  +--org.apache.poi.hssf.record.Record
        |
        +--org.apache.poi.hssf.record.UnknownRecord

public class UnknownRecord
extends Record

Title: Unknown Record (for debugging)

Description: Unknown record just tells you the sid so you can figure out what records you are missing. Also helps us read/modify sheets we don't know all the records to. (HSSF leaves these alone!)

Company: SuperLink Software, Inc.

Version:
2.0-pre
Author:
Andrew C. Oliver (acoliver at apache dot org)

Fields inherited from class org.apache.poi.hssf.record.Record
sid
 
Constructor Summary
UnknownRecord()
           
UnknownRecord(short id, short size, byte[] data)
          construct an unknown record.
 
Method Summary
protected  void fillFields(byte[] data, short sid)
          called by the constructor, should set class level fields.
protected  void fillFields(byte[] data, short size, int offset)
          called by the constructor, should set class level fields.
 int getRecordSize()
          gives the current serialized size of the record.
 short getSid()
          return the non static version of the id for this record.
 int serialize(int offset, byte[] data)
          spit the record out AS IS.
 java.lang.String toString()
          print a sort of string representation ([UNKNOWN RECORD] id = x [/UNKNOWN RECORD])
protected  void validateSid(short id)
          NO OP!
 
Methods inherited from class org.apache.poi.hssf.record.Record
isInValueSection, isValue, processContinueRecord, serialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnknownRecord

public UnknownRecord()

UnknownRecord

public UnknownRecord(short id,
                     short size,
                     byte[] data)
construct an unknown record. No fields are interperated and the record will be serialized in its original form more or less
Parameters:
id - id of the record -not validated, just stored for serialization
size - size of the data
data - the data
Method Detail

serialize

public int serialize(int offset,
                     byte[] data)
spit the record out AS IS. no interperatation or identification
Overrides:
serialize in class Record
Following copied from class: org.apache.poi.hssf.record.Record
Parameters:
offset - to begin writing at
data - byte array containing instance data
Returns:
number of bytes written

getRecordSize

public int getRecordSize()
Description copied from class: Record
gives the current serialized size of the record.
Overrides:
getRecordSize in class Record

fillFields

protected void fillFields(byte[] data,
                          short sid)
Description copied from class: Record
called by the constructor, should set class level fields. Should throw runtime exception for bad/icomplete data.
Overrides:
fillFields in class Record
Following copied from class: org.apache.poi.hssf.record.Record
Parameters:
data - raw data

validateSid

protected void validateSid(short id)
NO OP!
Overrides:
validateSid in class Record
Following copied from class: org.apache.poi.hssf.record.Record
Parameters:
id - alleged id for this record

toString

public java.lang.String toString()
print a sort of string representation ([UNKNOWN RECORD] id = x [/UNKNOWN RECORD])
Overrides:
toString in class Record

getSid

public short getSid()
Description copied from class: Record
return the non static version of the id for this record.
Overrides:
getSid in class Record

fillFields

protected void fillFields(byte[] data,
                          short size,
                          int offset)
called by the constructor, should set class level fields. Should throw runtime exception for bad/icomplete data.
Overrides:
fillFields in class Record
Parameters:
data - raw data
size - size of data
offset - of the records data (provided a big array of the file)


Copyright © 2002 Apache jakarta-poi project. All Rights Reserved.