Class IntegerDecoder
- java.lang.Object
-
- org.apache.directory.api.asn1.ber.tlv.IntegerDecoder
-
public final class IntegerDecoder extends Object
Parse and decode an Integer value.- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intparse(BerValue value)Parse a byte buffer and send back an integerstatic intparse(BerValue value, int min, int max)Parse a byte buffer and send back an integer, controlling that this number is in a specified interval.
-
-
-
Method Detail
-
parse
public static int parse(BerValue value, int min, int max) throws IntegerDecoderException
Parse a byte buffer and send back an integer, controlling that this number is in a specified interval.- Parameters:
value- The Value containing the byte[] to parsemin- Lowest value allowed, includedmax- Highest value allowed, included- Returns:
- An integer
- Throws:
IntegerDecoderException- Thrown if the byte[] does not contains an integer
-
parse
public static int parse(BerValue value) throws IntegerDecoderException
Parse a byte buffer and send back an integer- Parameters:
value- The byte buffer to parse- Returns:
- An integer
- Throws:
IntegerDecoderException- Thrown if the byte stream does not contains an integer
-
-