You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2004/08/23 01:19:16 UTC

svn commit: rev 36704 - incubator/directory/snickers/branches/encoder-redesign/ber-codec/src/java/org/apache/snickers/ber

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;
     }