jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r748065 - /jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/ValueHelper.java
Date Thu, 26 Feb 2009 09:19:58 GMT
Author: mreutegg
Date: Thu Feb 26 09:19:57 2009
New Revision: 748065

URL: http://svn.apache.org/viewvc?rev=748065&view=rev
Log:
JCR-1997: Performance fix, when deserializing large jcr:binary in ValueHelper.deserialize()

Modified:
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/ValueHelper.java

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/ValueHelper.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/ValueHelper.java?rev=748065&r1=748064&r2=748065&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/ValueHelper.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/ValueHelper.java
Thu Feb 26 09:19:57 2009
@@ -35,6 +35,8 @@
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.FilterInputStream;
+import java.io.OutputStream;
+import java.io.BufferedOutputStream;
 
 /**
  * The <code>ValueHelper</code> class provides several <code>Value</code>
@@ -754,7 +756,7 @@
             // decode to temp file
             TransientFileFactory fileFactory = TransientFileFactory.getInstance();
             final File tmpFile = fileFactory.createTransientFile("bin", null, null);
-            FileOutputStream out = new FileOutputStream(tmpFile);
+            OutputStream out = new BufferedOutputStream(new FileOutputStream(tmpFile));
             try {
                 Base64.decode(reader, out);
             } finally {



Mime
View raw message