From df426d8775737476ca79980ddc5a1b197f53207e Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Fri, 06 Feb 2009 11:45:32 +0000
Subject: [PATCH] Add readStartSet and readEndSet methods to ASN1Reader for consistency with ASNWriter APIs. Also add writeStartSet(byte) method to ASN1Writer for consistency with sequence related methods.

---
 opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java b/opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java
index b67a5f5..95ddae8 100644
--- a/opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java
+++ b/opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Copyright 2006-2009 Sun Microsystems, Inc.
  */
 package org.opends.server.protocols.asn1;
 
@@ -128,6 +128,17 @@
 
 
   /**
+   * Finishes reading a set. Any elements not read in the set will be
+   * discarded.
+   *
+   * @throws ASN1Exception
+   *           If an error occurs while advancing to the end of the set.
+   */
+  void readEndSet() throws ASN1Exception;
+
+
+
+  /**
    * Reads the next ASN.1 element as an integer and advances the
    * cursor.
    *
@@ -223,6 +234,17 @@
 
 
   /**
+   * Reads the next ASN.1 element as a set. All further reads will read
+   * the elements in the sequence until {@link #readEndSet()} is called.
+   *
+   * @throws ASN1Exception
+   *           If the next element is not a set.
+   */
+  void readStartSet() throws ASN1Exception;
+
+
+
+  /**
    * Advances this ASN.1 reader beyond the next ASN.1 element without
    * decoding it.
    *

--
Gitblit v1.10.0