chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1333995 - /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/ThresholdOutputStream.java
Date Fri, 04 May 2012 14:39:01 GMT
Author: fmui
Date: Fri May  4 14:39:01 2012
New Revision: 1333995

URL: http://svn.apache.org/viewvc?rev=1333995&view=rev
Log:
Server: Allow access to bytes if the content is in memory

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/ThresholdOutputStream.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/ThresholdOutputStream.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/ThresholdOutputStream.java?rev=1333995&r1=1333994&r2=1333995&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/ThresholdOutputStream.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/ThresholdOutputStream.java
Fri May  4 14:39:01 2012
@@ -242,6 +242,12 @@ public class ThresholdOutputStream exten
          * <code>null</code> is the data is stored in memory.
          */
         File getTemporaryFile();
+
+        /**
+         * Returns content as a byte array if the data is stored in memory.
+         * Returns <code>null</code> is the data is stored in a file.
+         */
+        byte[] getBytes();
     }
 
     /**
@@ -259,6 +265,10 @@ public class ThresholdOutputStream exten
             return null;
         }
 
+        public byte[] getBytes() {
+            return buf;
+        }
+
         @Override
         public boolean markSupported() {
             return false;
@@ -335,6 +345,10 @@ public class ThresholdOutputStream exten
             return tempFile;
         }
 
+        public byte[] getBytes() {
+            return null;
+        }
+
         @Override
         public boolean markSupported() {
             return false;



Mime
View raw message