jxl.read.biff
Class CompoundFile

java.lang.Object
  extended byjxl.biff.BaseCompoundFile
      extended byjxl.read.biff.CompoundFile

public final class CompoundFile
extends BaseCompoundFile

Reads in and defrags an OLE compound compound file (Made public only for the PropertySets demo)


Nested Class Summary
 
Nested classes inherited from class jxl.biff.BaseCompoundFile
BaseCompoundFile.PropertyStorage
 
Field Summary
 
Fields inherited from class jxl.biff.BaseCompoundFile
BIG_BLOCK_DEPOT_BLOCKS_POS, BIG_BLOCK_SIZE, COMP_OBJ_NAME, DIRECTORY_PS_TYPE, DOCUMENT_SUMMARY_INFORMATION_NAME, EXTENSION_BLOCK_POS, FILE_PS_TYPE, IDENTIFIER, NONE_PS_TYPE, NUM_BIG_BLOCK_DEPOT_BLOCKS_POS, NUM_EXTENSION_BLOCK_POS, NUM_SMALL_BLOCK_DEPOT_BLOCKS_POS, PROPERTY_STORAGE_BLOCK_SIZE, ROOT_ENTRY_NAME, ROOT_ENTRY_PS_TYPE, ROOT_START_BLOCK_POS, SMALL_BLOCK_DEPOT_BLOCK_POS, SMALL_BLOCK_SIZE, SMALL_BLOCK_THRESHOLD, STANDARD_PROPERTY_SETS, SUMMARY_INFORMATION_NAME, WORKBOOK_NAME
 
Constructor Summary
CompoundFile(byte[] d, WorkbookSettings ws)
          Initializes the compound file
 
Method Summary
 BaseCompoundFile.PropertyStorage findPropertyStorage(java.lang.String name)
          Recursively searches the property storages in hierarchy order for the appropriate name.
 int getNumberOfPropertySets()
          Gets the number of property sets
 BaseCompoundFile.PropertyStorage getPropertySet(int index)
          Gets the property set.
 byte[] getStream(int psIndex)
          Gets the defragmented stream from this ole compound file.
 byte[] getStream(java.lang.String streamName)
          Gets the defragmented stream from this ole compound file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompoundFile

public CompoundFile(byte[] d,
                    WorkbookSettings ws)
             throws BiffException
Initializes the compound file

Parameters:
d - the raw data of the ole stream
ws - the workbook settings
Throws:
BiffException
Method Detail

getStream

public byte[] getStream(java.lang.String streamName)
                 throws BiffException
Gets the defragmented stream from this ole compound file

Parameters:
streamName - the stream name to get
Returns:
the defragmented ole stream
Throws:
BiffException

getStream

public byte[] getStream(int psIndex)
                 throws BiffException
Gets the defragmented stream from this ole compound file. Used when copying workbooks with macros

Parameters:
psIndex - the property storage index
Returns:
the defragmented ole stream
Throws:
BiffException

findPropertyStorage

public BaseCompoundFile.PropertyStorage findPropertyStorage(java.lang.String name)
Recursively searches the property storages in hierarchy order for the appropriate name. This is the public version which is invoked from the writable version when copying a sheet with addition property sets.


getNumberOfPropertySets

public int getNumberOfPropertySets()
Gets the number of property sets

Returns:
the number of property sets

getPropertySet

public BaseCompoundFile.PropertyStorage getPropertySet(int index)
Gets the property set. Invoked when copying worksheets with macros. Simply calls the private counterpart

Returns:
the property set with the given name