/** * Gets the current position within the file * * @return the current position */ int getPos() throws IOException { return data.getPosition(); }
/** * Gets the current position within the file * * @return the current position */ int getPos() throws IOException { return data.getPosition(); }
/** * 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(); } }
/** * 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(); } }