Package loci.poi.hssf.record
Class UnknownRecord
- java.lang.Object
-
- loci.poi.hssf.record.Record
-
- loci.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.
- Author:
- Andrew C. Oliver (acoliver at apache dot org), Jason Height (jheight at chariot dot net dot au), Glen Stampoultzis (glens at apache.org)
-
-
Constructor Summary
Constructors Constructor Description UnknownRecord()UnknownRecord(short id, byte[] data)UnknownRecord(RecordInputStream in)construct an unknown record.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Unlike the other Record.clone methods this is a shallow cloneprotected voidfillFields(byte[] data, short sid)protected voidfillFields(RecordInputStream in)called by the constructor, should set class level fields.intgetRecordSize()gives the current serialized size of the record.shortgetSid()return the non static version of the id for this record.intserialize(int offset, byte[] data)spit the record out AS IS.java.lang.StringtoString()print a sort of string representation ([UNKNOWN RECORD] id = x [/UNKNOWN RECORD])protected voidvalidateSid(short id)NO OP!-
Methods inherited from class loci.poi.hssf.record.Record
isInValueSection, isValue, serialize
-
-
-
-
Constructor Detail
-
UnknownRecord
public UnknownRecord()
-
UnknownRecord
public UnknownRecord(short id, byte[] data)- Parameters:
id- id of the record -not validated, just stored for serializationdata- the data
-
UnknownRecord
public UnknownRecord(RecordInputStream in)
construct an unknown record. No fields are interperated and the record will be serialized in its original form more or less- Parameters:
in- the RecordInputstream to read the record from
-
-
Method Detail
-
serialize
public int serialize(int offset, byte[] data)spit the record out AS IS. no interpretation or identification
-
getRecordSize
public int getRecordSize()
Description copied from class:Recordgives the current serialized size of the record. Should include the sid and reclength (4 bytes).- Overrides:
getRecordSizein classRecord
-
fillFields
protected void fillFields(byte[] data, short sid)
-
validateSid
protected void validateSid(short id)
NO OP!- Specified by:
validateSidin classRecord- 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])
-
getSid
public short getSid()
Description copied from class:Recordreturn the non static version of the id for this record.
-
fillFields
protected void fillFields(RecordInputStream in)
called by the constructor, should set class level fields. Should throw runtime exception for bad/icomplete data.- Specified by:
fillFieldsin classRecord- Parameters:
in- the RecordInputstream to read the record from
-
-