public final class IntegerDecoder extends Object
| Modifier and Type | Field and Description |
|---|---|
private static int[] |
MASK
A mask used to get only the necessary bytes
|
| Modifier | Constructor and Description |
|---|---|
private |
IntegerDecoder() |
| Modifier and Type | Method and Description |
|---|---|
static int |
parse(BerValue value)
Parse a byte buffer and send back an integer
|
static int |
parse(BerValue value,
int min,
int max)
Parse a byte buffer and send back an integer, controlling that this number
is in a specified interval.
|
private static int |
parseInt(BerValue value)
Helper method used to parse the integer.
|
public static int parse(BerValue value, int min, int max) throws IntegerDecoderException
value - The Value containing the byte[] to parsemin - Lowest value allowed, includedmax - Highest value allowed, includedIntegerDecoderException - Thrown if the byte[] does not contains an integerpublic static int parse(BerValue value) throws IntegerDecoderException
value - The byte buffer to parseIntegerDecoderException - Thrown if the byte stream does not contains an integerprivate static int parseInt(BerValue value) throws IntegerDecoderException
value - the BER PDU to parseIntegerDecoderException - If the BER contains an invalid integer valueCopyright © 2003–2023 The Apache Software Foundation. All rights reserved.