jxl.write.biff
Class File

java.lang.Object
  |
  +--jxl.write.biff.File

public final class File
extends java.lang.Object

A file of excel data to be written out. All the excel data is held in memory, and when the close method is called a CompoundFile object is used to write the Biff oriented excel data in the CompoundFile format


Field Summary
private  int arrayGrowSize
          The amount to increase the growable array by
private  byte[] data
          The data from the excel 97 file
private  int initialFileSize
          The initial file size
private  java.io.OutputStream outputStream
          The output stream
private  int pos
          The current position within the file
private  WorkbookSettings workbookSettings
          The workbook settings
 
Constructor Summary
(package private) File(java.io.OutputStream os, WorkbookSettings ws)
          Constructor
 
Method Summary
(package private)  void close(boolean cs)
          Closes the file.
(package private)  int getPos()
          Gets the current position within the file
(package private)  void setData(byte[] newdata, int pos)
          Used to manually alter the contents of the written out data.
 void write(ByteData record)
          Adds the biff record data to the memory allocated for this File
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

data

private byte[] data
The data from the excel 97 file

pos

private int pos
The current position within the file

outputStream

private java.io.OutputStream outputStream
The output stream

initialFileSize

private int initialFileSize
The initial file size

arrayGrowSize

private int arrayGrowSize
The amount to increase the growable array by

workbookSettings

private WorkbookSettings workbookSettings
The workbook settings
Constructor Detail

File

File(java.io.OutputStream os,
     WorkbookSettings ws)
Constructor
Parameters:
os - the output stream
ws - the configuration settings for this workbook
Method Detail

close

void close(boolean cs)
     throws java.io.IOException
Closes the file. In fact, this writes out all the excel data to disk using a CompoundFile object, and then frees up all the memory allocated to the workbook
Parameters:
cs - TRUE if this should close the stream, FALSE if the application closes it
Throws:
java.io.IOException -  

write

public void write(ByteData record)
           throws java.io.IOException
Adds the biff record data to the memory allocated for this File
Parameters:
record - the record to add to the excel data
Throws:
java.io.IOException -  

getPos

int getPos()
Gets the current position within the file
Returns:
the current position

setData

void setData(byte[] newdata,
             int pos)
Used to manually alter the contents of the written out data. This is used when cross-referencing cell records
Parameters:
pos - the position to alter
newdata - the data to modify