Package io.protostuff
Class NumberParser
java.lang.Object
io.protostuff.NumberParser
An IO utility for dealing with raw ascii bytes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
parseInt
(byte[] buffer, int start, int length, int radix) Parse an ascii int from a raw buffer.(package private) static int
parseInt
(byte[] buffer, int start, int length, int radix, boolean positive) static long
parseLong
(byte[] buffer, int start, int length, int radix) Parse an ascii long from a raw buffer.(package private) static long
parseLong
(byte[] buffer, int start, int length, int radix, boolean positive)
-
Constructor Details
-
NumberParser
private NumberParser()
-
-
Method Details
-
parseInt
public static int parseInt(byte[] buffer, int start, int length, int radix) throws NumberFormatException Parse an ascii int from a raw buffer.- Throws:
NumberFormatException
-
parseInt
static int parseInt(byte[] buffer, int start, int length, int radix, boolean positive) throws NumberFormatException - Throws:
NumberFormatException
-
parseLong
public static long parseLong(byte[] buffer, int start, int length, int radix) throws NumberFormatException Parse an ascii long from a raw buffer.- Throws:
NumberFormatException
-
parseLong
static long parseLong(byte[] buffer, int start, int length, int radix, boolean positive) throws NumberFormatException - Throws:
NumberFormatException
-