jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r177973 - in /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value: BLOBFileValue.java InternalValue.java
Date Mon, 23 May 2005 13:18:15 GMT
Author: tripod
Date: Mon May 23 06:18:15 2005
New Revision: 177973

URL: http://svn.apache.org/viewcvs?rev=177973&view=rev
Log:
- adding new method for creating blob file value

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/BLOBFileValue.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/InternalValue.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/BLOBFileValue.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/BLOBFileValue.java?rev=177973&r1=177972&r2=177973&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/BLOBFileValue.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/BLOBFileValue.java
Mon May 23 06:18:15 2005
@@ -145,6 +145,19 @@
     }
 
     /**
+     * Creates a new <code>BLOBFileValue</code> instance from a
+     * <code>byte[]</code> array.
+     *
+     * @param bytes byte buffer to be represented as a <code>BLOBFileValue</code>
instance
+     */
+    public BLOBFileValue(byte[] bytes) {
+        this.buffer = bytes;
+        this.file = null;
+        this.fsResource = null;
+        this.tmpFile = true;
+    }
+
+    /**
      * Creates a new <code>BLOBFileValue</code> instance from a <code>File</code>.
      *
      * @param file file to be represented as a <code>BLOBFileValue</code> instance

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/InternalValue.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/InternalValue.java?rev=177973&r1=177972&r2=177973&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/InternalValue.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/InternalValue.java
Mon May 23 06:18:15 2005
@@ -196,6 +196,14 @@
     /**
      * @param value
      * @return
+     */
+    public static InternalValue create(byte[] value) {
+        return new InternalValue(new BLOBFileValue(value));
+    }
+
+    /**
+     * @param value
+     * @return
      * @throws IOException
      */
     public static InternalValue create(InputStream value) throws IOException {



Mime
View raw message