/** * Gets the current position within the file * * @return the current position */ int getPos() throws IOException { return data.getPosition(); }
/** * Used to manually alter the contents of the written out data. This * is used when cross-referencing cell records * * @param pos the position to alter * @param newdata the data to modify */ void setData(byte[] newdata, int pos) throws IOException { data.setData(newdata, pos); }
/** * Writes out the excel data, padding it out with empty bytes as * necessary * Also write out empty * * @exception IOException */ private void writeExcelData() throws IOException { excelData.writeData(out); byte[] padding = new byte[requiredSize - size]; out.write(padding); }
/** * 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 * * @exception IOException * @param cs TRUE if this should close the stream, FALSE if the application * closes it */ void close(boolean cs) throws IOException, JxlWriteException { CompoundFile cf = new CompoundFile(data, data.getPosition(), outputStream, readCompoundFile); cf.write(); outputStream.flush(); data.close(); if (cs) { outputStream.close(); } // Cleanup the memory a bit data = null; if (!workbookSettings.getGCDisabled()) { System.gc(); } }
/** * Adds the biff record data to the memory allocated for this File * * @exception IOException * @param record the record to add to the excel data */ public void write(ByteData record) throws IOException { byte[] bytes = record.getBytes(); data.write(bytes); }
/** * 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 * * @exception IOException * @param cs TRUE if this should close the stream, FALSE if the application * closes it */ void close(boolean cs) throws IOException, JxlWriteException { CompoundFile cf = new CompoundFile(data, data.getPosition(), outputStream, readCompoundFile); cf.write(); outputStream.flush(); data.close(); if (cs) { outputStream.close(); } // Cleanup the memory a bit data = null; if (!workbookSettings.getGCDisabled()) { System.gc(); } }
/** * Adds the biff record data to the memory allocated for this File * * @exception IOException * @param record the record to add to the excel data */ public void write(ByteData record) throws IOException { byte[] bytes = record.getBytes(); data.write(bytes); }
/** * Used to manually alter the contents of the written out data. This * is used when cross-referencing cell records * * @param pos the position to alter * @param newdata the data to modify */ void setData(byte[] newdata, int pos) throws IOException { data.setData(newdata, pos); }
/** * Gets the current position within the file * * @return the current position */ int getPos() throws IOException { return data.getPosition(); }
/** * Writes out the excel data, padding it out with empty bytes as * necessary * Also write out empty * * @exception IOException */ private void writeExcelData() throws IOException { excelData.writeData(out); byte[] padding = new byte[requiredSize - size]; out.write(padding); }