directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 36704 - incubator/directory/snickers/branches/encoder-redesign/ber-codec/src/java/org/apache/snickers/ber
Date Sun, 22 Aug 2004 23:19:16 GMT
Author: akarasulu
Date: Sun Aug 22 16:19:16 2004
New Revision: 36704

Modified:
   incubator/directory/snickers/branches/encoder-redesign/ber-codec/src/java/org/apache/snickers/ber/Tuple.java
Log:
Added method to be able to alter the value length of a tuple.  This is in 
preparation for the tuple tree visitor that converts indefinate tuple trees
into definate length tuple trees.


Modified: incubator/directory/snickers/branches/encoder-redesign/ber-codec/src/java/org/apache/snickers/ber/Tuple.java
==============================================================================
--- incubator/directory/snickers/branches/encoder-redesign/ber-codec/src/java/org/apache/snickers/ber/Tuple.java
(original)
+++ incubator/directory/snickers/branches/encoder-redesign/ber-codec/src/java/org/apache/snickers/ber/Tuple.java
Sun Aug 22 16:19:16 2004
@@ -65,7 +65,7 @@
     boolean isPrimitive = true ;
     /** the type class for this TLV */
     TypeClass typeClass = TypeClass.APPLICATION ;
-    /** the length for this TLV tuple */
+    /** the length for this TLV tuple's value field */
     int length = 0 ;
     /** the present value chunk buffer read for this TLV tuple */
     ByteBuffer valueChunk = EMPTY_BUFFER ;
@@ -645,6 +645,18 @@
             throw new IllegalArgumentException( "cannot support id's as large "
                     + "as " + id + " unless we start using longs for the id" ) ;
         }
+    }
+
+
+    /**
+     * Sets the value length of this Tuple.
+     *
+     * @param length the length of this tuple's value.
+     * @see Tuple#size() to get the entire determinate length of tuple
+     */
+    public void setValueLength( int length )
+    {
+        this.length = length;
     }
 
 

Mime
View raw message