commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1152105 - /commons/proper/compress/trunk/src/site/xdoc/examples.xml
Date Fri, 29 Jul 2011 04:57:54 GMT
Author: bodewig
Date: Fri Jul 29 04:57:54 2011
New Revision: 1152105

URL: http://svn.apache.org/viewvc?rev=1152105&view=rev
Log:
recommend using the File constructor in ZipArchiveOutputStream

Modified:
    commons/proper/compress/trunk/src/site/xdoc/examples.xml

Modified: commons/proper/compress/trunk/src/site/xdoc/examples.xml
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/site/xdoc/examples.xml?rev=1152105&r1=1152104&r2=1152105&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/site/xdoc/examples.xml (original)
+++ commons/proper/compress/trunk/src/site/xdoc/examples.xml Fri Jul 29 04:57:54 2011
@@ -203,6 +203,14 @@ zipOutput.write(contentOfEntry);
 zipOutput.closeArchiveEntry();
 ]]></source>
 
+        <p><code>ZipArchiveOutputStream</code> can use some internal
+          optimizations exploiting <code>RandomAccessFile</code> if it
+          knows it is writing to a file rather than a non-seekable
+          stream.  If you are writing to a file, you should use the
+          constructor that accepts a <code>File</code> argument rather
+          than the one using an <code>OutputStream</code> or the
+          factory method in <code>ArchiveStreamFactory</code>.</p>
+
         <p>Reading entries from an zip archive:</p>
 <source><![CDATA[
 ZipArchiveEntry entry = zipInput.getNextZipEntry();



Mime
View raw message