cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1547892 - /cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/types/ByteArrayType.java
Date Wed, 04 Dec 2013 20:05:00 GMT
Author: aadamchik
Date: Wed Dec  4 20:05:00 2013
New Revision: 1547892

URL: http://svn.apache.org/r1547892
Log:
CAY-1890 Remove Cayenne-level buffering when retrieving LOBs

same for BLOBs

Modified:
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/types/ByteArrayType.java

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/types/ByteArrayType.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/types/ByteArrayType.java?rev=1547892&r1=1547891&r2=1547892&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/types/ByteArrayType.java
(original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/types/ByteArrayType.java
Wed Dec  4 20:05:00 2013
@@ -19,7 +19,6 @@
 
 package org.apache.cayenne.access.types;
 
-import java.io.BufferedInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -167,13 +166,8 @@ public class ByteArrayType implements Ex
         if (size == 0) {
             return new byte[0];
         }
-
-        int bufSize = (size < BUF_SIZE) ? size : BUF_SIZE;
-        InputStream in = blob.getBinaryStream();
-        return (in != null) ? readValueStream(
-                new BufferedInputStream(in, bufSize),
-                size,
-                bufSize) : null;
+        
+        return blob.getBytes(1, size);
     }
 
     protected byte[] readBinaryStream(ResultSet rs, int index) throws IOException,



Mime
View raw message