Save This Page
Home » cocoon-2.1.11-src » org.apache.cocoon.poi » hssf » record » [javadoc | source]
org.apache.cocoon.poi.hssf.record
public class: RKRecord [javadoc | source]
java.lang.Object
   org.apache.cocoon.poi.hssf.record.Record
      org.apache.cocoon.poi.hssf.record.RKRecord

All Implemented Interfaces:
    CellValueRecordInterface

Title: RK Record Description: An internal 32 bit number with the two most significant bits storing the type. This is part of a bizarre scheme to save disk space and memory (gee look at all the other whole records that are in the file just "cause"..,far better to waste processor cycles on this then leave on of those "valuable" records out).

We support this in READ-ONLY mode. HSSF converts these to NUMBER records

Copyright: Copyright (c) 2001 SuperLink Software, Inc.

REFERENCE: PG 376 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)

Field Summary
public static final  short sid     
public static final  short RK_IEEE_NUMBER     
public static final  short RK_IEEE_NUMBER_TIMES_100     
public static final  short RK_INTEGER     
public static final  short RK_INTEGER_TIMES_100     
Fields inherited from org.apache.cocoon.poi.hssf.record.Record:
sid
Constructor:
 public RKRecord() 
 public RKRecord(short id,
    short size,
    byte[] data) 
 public RKRecord(short id,
    short size,
    byte[] data,
    int offset) 
Method from org.apache.cocoon.poi.hssf.record.RKRecord Summary:
fillFields,   getColumn,   getRKField,   getRKNumber,   getRKType,   getRow,   getSid,   getXFIndex,   isAfter,   isBefore,   isEqual,   isInValueSection,   isValue,   main,   serialize,   setColumn,   setRow,   setXFIndex,   toString,   validateSid
Methods from org.apache.cocoon.poi.hssf.record.Record:
fillFields,   fillFields,   getRecordSize,   getSid,   isInValueSection,   isValue,   processContinueRecord,   serialize,   toString,   validateSid
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.poi.hssf.record.RKRecord Detail:
 protected  void fillFields(byte[] data,
    short size,
    int offset) 
 public short getColumn() 
 public int getRKField() 
 public double getRKNumber() 
    Extract the value of the number

    The mechanism for determining the value is dependent on the two low order bits of the raw number. If bit 1 is set, the number is an integer and can be cast directly as a double, otherwise, it's apparently the exponent and mantissa of a double (and the remaining low-order bits of the double's mantissa are 0's).

    If bit 0 is set, the result of the conversion to a double is divided by 100; otherwise, the value is left alone.

    [insert picture of Screwy Squirrel in full Napoleonic regalia]

 public short getRKType() 
    Get the type of the number
 public short getRow() 
 public short getSid() 
 public short getXFIndex() 
 public boolean isAfter(CellValueRecordInterface i) 
 public boolean isBefore(CellValueRecordInterface i) 
 public boolean isEqual(CellValueRecordInterface i) 
 public boolean isInValueSection() 
 public boolean isValue() 
 public static  void main(String[] ignored_args) 
    Debugging main()

    Normally I'd do this in a junit test, but let's face it -- once this algorithm has been tested and it works, we are never ever going to change it. This is driven by the Faceless Enemy's minions, who dare not change the algorithm out from under us.

 public byte[] serialize() 
 public  void setColumn(short col) 
 public  void setRow(short row) 
 public  void setXFIndex(short xf) 
    NO OP!
 public String toString() 
 protected  void validateSid(short id)