directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r291944 - /directory/asn1/branches/asn1-NameComponent/ber-new/src/java/main/org/apache/asn1new/util/IntegerDecoder.java
Date Tue, 27 Sep 2005 13:59:44 GMT
Author: elecharny
Date: Tue Sep 27 06:59:40 2005
New Revision: 291944

URL: http://svn.apache.org/viewcvs?rev=291944&view=rev
Log:
Committed to be able to work at home

Modified:
    directory/asn1/branches/asn1-NameComponent/ber-new/src/java/main/org/apache/asn1new/util/IntegerDecoder.java

Modified: directory/asn1/branches/asn1-NameComponent/ber-new/src/java/main/org/apache/asn1new/util/IntegerDecoder.java
URL: http://svn.apache.org/viewcvs/directory/asn1/branches/asn1-NameComponent/ber-new/src/java/main/org/apache/asn1new/util/IntegerDecoder.java?rev=291944&r1=291943&r2=291944&view=diff
==============================================================================
--- directory/asn1/branches/asn1-NameComponent/ber-new/src/java/main/org/apache/asn1new/util/IntegerDecoder.java
(original)
+++ directory/asn1/branches/asn1-NameComponent/ber-new/src/java/main/org/apache/asn1new/util/IntegerDecoder.java
Tue Sep 27 06:59:40 2005
@@ -16,7 +16,6 @@
  */
 package org.apache.asn1new.util;
 
-import org.apache.asn1.codec.DecoderException;
 import org.apache.asn1new.ber.tlv.Value;
 
 
@@ -40,7 +39,7 @@
      *
      * @throws DecoderException Thrown if the byte stream does not contains an integer
      */
-    public static int parse( Value value, int min, int max ) throws DecoderException
+    public static int parse( Value value, int min, int max ) throws IntegerDecoderException
     {
 
         int    result = 0;
@@ -49,7 +48,7 @@
 
         if ( bytes.length > 4 )
         {
-            throw new DecoderException(
+            throw new IntegerDecoderException(
                 "The value is more than 4 bytes long. This is not allowed for an integer"
);
         }
 
@@ -65,7 +64,7 @@
         }
         else
         {
-            throw new DecoderException( "The value is not in the range [" + min + ", " +
max + "]" );
+            throw new IntegerDecoderException( "The value is not in the range [" + min +
", " + max + "]" );
         }
     }
     
@@ -78,7 +77,7 @@
      *
      * @throws DecoderException Thrown if the byte stream does not contains an integer
      */
-    public static int parse( Value value ) throws DecoderException
+    public static int parse( Value value ) throws IntegerDecoderException
     {
     	return parse( value, Integer.MIN_VALUE, Integer.MAX_VALUE ); 
     }



Mime
View raw message