|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.poi.hssf.record.Record
Title: Record Description: All HSSF Records inherit from this class. It populates the fields common to all records (id, size and data). Subclasses should be sure to validate the id, Company:
Field Summary | |
short |
sid
The static ID, subclasses should override this value with the id for the record type they handle. |
Constructor Summary | |
Record()
instantiates a blank record strictly for ID matching |
|
Record(short id,
short size,
byte[] data)
Constructor Record |
|
Record(short id,
short size,
byte[] data,
int offset)
Constructor Record |
Method Summary | |
protected void |
fillFields(byte[] data,
short size)
called by the constructor, should set class level fields. |
protected abstract 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. |
abstract short |
getSid()
return the non static version of the id for this record. |
boolean |
isInValueSection()
DBCELL, ROW, VALUES all say yes |
boolean |
isValue()
tells whether this type of record contains a value |
void |
processContinueRecord(byte[] record)
Process a continuation record; default handling is to ignore it -- TODO add logging |
byte[] |
serialize()
called by the class that is responsible for writing this sucker. |
abstract int |
serialize(int offset,
byte[] data)
called by the class that is responsible for writing this sucker. |
java.lang.String |
toString()
get a string representation of the record (for biffview/debugging) |
protected abstract void |
validateSid(short id)
called by constructor, should throw runtime exception in the event of a record passed with a differing ID. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public short sid
Constructor Detail |
public Record()
public Record(short id, short size, byte[] data)
id
- record idsize
- record sizedata
- raw datapublic Record(short id, short size, byte[] data, int offset)
id
- record idsize
- record sizedata
- raw dataMethod Detail |
protected abstract void validateSid(short id)
id
- alleged id for this recordprotected void fillFields(byte[] data, short size)
data
- raw dataprotected abstract void fillFields(byte[] data, short size, int offset)
data
- raw datasize
- size of dataoffset
- of the record's data (provided a big array of the file)public byte[] serialize()
public abstract int serialize(int offset, byte[] data)
offset
- to begin writing atdata
- byte array containing instance datapublic int getRecordSize()
public boolean isValue()
public boolean isInValueSection()
public java.lang.String toString()
toString
in class java.lang.Object
public void processContinueRecord(byte[] record)
record
- the continuation record's datapublic abstract short getSid()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |