You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2012/05/04 16:39:01 UTC
svn commit: r1333995 -
/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/ThresholdOutputStream.java
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;