Browse Source

POI:bug 57919: add performance note to javadocs about using BufferedOutputStreams on Document.write(OutputStream) if underlying resource is high latency

pull/290/head
antony liu 6 years ago
parent
commit
9e13692879
  1. 6
      main/HSSF/UserModel/HSSFWorkbook.cs
  2. 7
      main/POIDocument.cs
  3. 5
      ooxml/POIXMLDocument.cs

6
main/HSSF/UserModel/HSSFWorkbook.cs

@ -1337,6 +1337,12 @@ namespace NPOI.HSSF.UserModel
/// Write out this workbook to an 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.
///
/// </summary>
/// <param name="stream">the java OutputStream you wish to Write the XLS to</param>
public override void Write(Stream stream)

7
main/POIDocument.cs

@ -347,9 +347,16 @@ namespace NPOI
/// <summary>
/// Writes the document out to the specified output stream. The
/// stream is not closed as part of this operation.
///
/// 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.
///
/// </summary>
/// <param name="out1">The stream to write to.</param>
public abstract void Write(Stream out1);

5
ooxml/POIXMLDocument.cs

@ -195,6 +195,11 @@ namespace NPOI
* 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 Stream you wish to write the file to
*

Loading…
Cancel
Save