harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjanu...@apache.org
Subject svn commit: r673315 - /harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java
Date Wed, 02 Jul 2008 08:41:26 GMT
Author: sjanuary
Date: Wed Jul  2 01:41:24 2008
New Revision: 673315

URL: http://svn.apache.org/viewvc?rev=673315&view=rev
Log:
Apply patch for HARMONY-5888 ([classlib][pack200] Segment.writeJar is writing unbuffered (performance)
)

Modified:
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java?rev=673315&r1=673314&r2=673315&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java
Wed Jul  2 01:41:24 2008
@@ -17,6 +17,7 @@
 package org.apache.harmony.unpack200;
 
 import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -423,7 +424,8 @@
     public void writeJar(JarOutputStream out) throws IOException,
             Pack200Exception {
         fileBands.processFileBits();
-        DataOutputStream dos = new DataOutputStream(out);
+        BufferedOutputStream buffer = new BufferedOutputStream(out);
+        DataOutputStream dos = new DataOutputStream(buffer);
         String[] fileName = fileBands.getFileName();
         long[] fileModtime = fileBands.getFileModtime();
         long[] fileOptions = fileBands.getFileOptions();
@@ -472,7 +474,6 @@
             }
         }
         dos.flush();
-        out.flush();
     }
 
     public SegmentConstantPool getConstantPool() {



Mime
View raw message