Class JavaBigIntegerFromByteArray
java.lang.Object
ch.randelshofer.fastdoubleparser.AbstractNumberParser
ch.randelshofer.fastdoubleparser.AbstractBigIntegerParser
ch.randelshofer.fastdoubleparser.JavaBigIntegerFromByteArray
-
Field Summary
Fields inherited from class AbstractBigIntegerParser
RECURSION_THRESHOLDFields inherited from class AbstractNumberParser
CHAR_TO_HEX_MAP, DECIMAL_POINT_CLASS, ILLEGAL_OFFSET_OR_ILLEGAL_LENGTH, OTHER_CLASS, SYNTAX_ERROR, SYNTAX_ERROR_BITS, VALUE_EXCEEDS_LIMITS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparseBigIntegerString(byte[] str, int offset, int length, int radix) Parses aBigIntegerLiteralas specified inJavaBigIntegerParser.private BigIntegerparseDecDigits(byte[] str, int from, int to, boolean isNegative) private BigIntegerparseHexDigits(byte[] str, int from, int to, boolean isNegative) private BigIntegerparseManyDecDigits(byte[] str, int from, int to, boolean isNegative) private intskipZeroes(byte[] str, int from, int to) Methods inherited from class AbstractBigIntegerParser
checkDecBigIntegerBounds, checkHexBigIntegerBounds, hasManyDigitsMethods inherited from class AbstractNumberParser
charAt, charAt, charAt, checkBounds, checkBounds, lookupHex, lookupHex
-
Constructor Details
-
JavaBigIntegerFromByteArray
JavaBigIntegerFromByteArray()
-
-
Method Details
-
parseBigIntegerString
public BigInteger parseBigIntegerString(byte[] str, int offset, int length, int radix) throws NumberFormatException Parses aBigIntegerLiteralas specified inJavaBigIntegerParser.- Parameters:
str- the input stringoffset- the start of the stringlength- the length of the stringradix- the radix of the number- Returns:
- the parsed value (always non-null)
- Throws:
NumberFormatException- if parsing fails
-
parseDecDigits
-
parseHexDigits
-
parseManyDecDigits
-
skipZeroes
private int skipZeroes(byte[] str, int from, int to)
-