* Note - if the Document was opened from a {@link File} rather
* than an {@link InputStream}, you <b>must</b> write out to
* a different file, overwriting via an OutputStream isn't possible.
+ *
+ * If {@code stream} is a {@link java.io.FileOutputStream} on a networked drive
+ * or has a high cost/latency associated with each written byte,
+ * consider wrapping the OutputStream in a {@link java.io.BufferedOutputStream}
+ * to improve write performance.
*
* @param out The stream to write to.
*
* Method write - write out this workbook to an {@link OutputStream}. Constructs
* a new POI POIFSFileSystem, passes in the workbook binary representation and
* writes it out.
+ *
+ * If {@code stream} is a {@link java.io.FileOutputStream} on a networked drive
+ * or has a high cost/latency associated with each written byte,
+ * consider wrapping the OutputStream in a {@link java.io.BufferedOutputStream}
+ * to improve write performance.
*
* @param stream - the java OutputStream you wish to write the XLS to
*
* Note - if the Document was opened from a {@link File} rather
* than an {@link InputStream}, you <b>must</b> write out to
* a different file, overwriting via an OutputStream isn't possible.
+ *
+ * If {@code stream} is a {@link java.io.FileOutputStream} on a networked drive
+ * or has a high cost/latency associated with each written byte,
+ * consider wrapping the OutputStream in a {@link java.io.BufferedOutputStream}
+ * to improve write performance.
*
* @param stream - the java OutputStream you wish to write the file to
*
*/
public final class HWPFDocument extends HWPFDocumentCore
{
- static final String PROPERTY_PRESERVE_BIN_TABLES = "org.apache.poi.hwpf.preserveBinTables";
+ /*package*/ static final String PROPERTY_PRESERVE_BIN_TABLES = "org.apache.poi.hwpf.preserveBinTables";
private static final String PROPERTY_PRESERVE_TEXT_TABLE = "org.apache.poi.hwpf.preserveTextTable";
private static final String STREAM_DATA = "Data";
/**
* Writes out the word file that is represented by an instance of this class.
+ *
+ * If {@code stream} is a {@link java.io.FileOutputStream} on a networked drive
+ * or has a high cost/latency associated with each written byte,
+ * consider wrapping the OutputStream in a {@link java.io.BufferedOutputStream}
+ * to improve write performance.
*
* @param out The OutputStream to write to.
* @throws IOException If there is an unexpected IOException from the passed