directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 22830 - incubator/directory/snickers/trunk/ber-codec/src/java/org/apache/snickers/ber
Date Mon, 12 Jul 2004 05:23:50 GMT
Author: akarasulu
Date: Sun Jul 11 22:23:50 2004
New Revision: 22830

Modified:
   incubator/directory/snickers/trunk/ber-codec/src/java/org/apache/snickers/ber/Tuple.java
Log:
added some extra setters

Modified: incubator/directory/snickers/trunk/ber-codec/src/java/org/apache/snickers/ber/Tuple.java
==============================================================================
--- incubator/directory/snickers/trunk/ber-codec/src/java/org/apache/snickers/ber/Tuple.java
(original)
+++ incubator/directory/snickers/trunk/ber-codec/src/java/org/apache/snickers/ber/Tuple.java
Sun Jul 11 22:23:50 2004
@@ -315,7 +315,14 @@
         return length ;
     }
 
-    
+
+
+    public void setLength( int length )
+    {
+        this.length = length;
+    }
+
+
     /**
      * Gets the BER TLV TypeClass for this TLV Tuple.
      * 
@@ -336,8 +343,20 @@
     {
         return valueChunk ;
     }
-    
-    
+
+
+    /**
+     * Sets the value representing the last chunk read or the last chunch to
+     * write.
+     *
+     * @param buf the last chunk as a buffer
+     */
+    public void setLastValueChunk( ByteBuffer buf )
+    {
+        this.valueChunk = buf;
+    }
+
+
     /**
      * Gets the total size of this TLV tuple in bytes.  This includes the
      * length of the tag field, the length of the length field and the length
@@ -470,16 +489,16 @@
     
     
     /**
-     * @todo this should produce chunking output and needs to be removed from
-     * here actually and made into a standalone encoder.  You give it a buffer
-     * and it fills it as much as it can remembering where the encode stopped.
-     * Hence it is stateful as expected from the statemachine.
-     * 
-     * If this is a primitive TLV then the valueBytes argument is used to 
+     * If this is a primitive TLV then the valueBytes argument is used to
      * produce an encoded image of this TLV.  If it is constructed then
      * only the TL part of the tuple is encoded leaving the value to be encoded
      * by the set of child TLVs.
      * 
+     * @todo this should produce chunking output and needs to be removed from
+     * here actually and made into a standalone encoder.  You give it a buffer
+     * and it fills it as much as it can remembering where the encode stopped.
+     * Hence it is stateful as expected from the statemachine.
+     *
      * @return partial encoded image if constructed or complete TLV if primitive
      */
     public ByteBuffer toEncodedBuffer( List valueChunks )

Mime
View raw message