Package org.apache.groovy.json.internal
Class CharScanner
java.lang.Object
org.apache.groovy.json.internal.CharScanner
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
debugCharDescription
(int c) static String
errorDetails
(String message, char[] array, int index, int ch) static boolean
hasDecimalChar
(char[] chars, boolean negative) static boolean
isDecimalChar
(int currentChar) static boolean
isDecimalDigit
(int c) protected static boolean
isDelimiter
(int c) static boolean
isDigit
(int c) static boolean
isInteger
(char[] digitChars) static boolean
isInteger
(char[] digitChars, int offset, int len) static boolean
isLong
(char[] digitChars) static boolean
isLong
(char[] digitChars, int offset, int len) static boolean
isNumberDigit
(int c) static BigDecimal
parseBigDecimal
(char[] buffer) static double
parseDouble
(char[] buffer, int from, int to) static float
parseFloat
(char[] buffer, int from, int to) static int
parseInt
(char[] digitChars) static int
parseIntFromTo
(char[] digitChars, int offset, int to) static int
parseIntFromToIgnoreDot
(char[] digitChars, int offset, int to) static Number
parseJsonNumber
(char[] buffer) static Number
parseJsonNumber
(char[] buffer, int from, int to) static Number
parseJsonNumber
(char[] buffer, int from, int max, int[] size) static long
parseLong
(char[] digitChars) static long
parseLongFromTo
(char[] digitChars, int offset, int to) static long
parseLongFromToIgnoreDot
(char[] digitChars, int offset, int to) static char[]
readNumber
(char[] array, int idx, int len) static int
skipWhiteSpace
(char[] array, int index, int length)
-
Field Details
-
COMMA
protected static final int COMMA- See Also:
-
CLOSED_CURLY
protected static final int CLOSED_CURLY- See Also:
-
CLOSED_BRACKET
protected static final int CLOSED_BRACKET- See Also:
-
LETTER_E
protected static final int LETTER_E- See Also:
-
LETTER_BIG_E
protected static final int LETTER_BIG_E- See Also:
-
DECIMAL_POINT
protected static final int DECIMAL_POINT- See Also:
-
ALPHA_0
protected static final int ALPHA_0- See Also:
-
ALPHA_9
protected static final int ALPHA_9- See Also:
-
MINUS
protected static final int MINUS- See Also:
-
PLUS
protected static final int PLUS- See Also:
-
-
Constructor Details
-
CharScanner
public CharScanner()
-
-
Method Details
-
isDigit
public static boolean isDigit(int c) -
isDecimalDigit
public static boolean isDecimalDigit(int c) -
isDecimalChar
public static boolean isDecimalChar(int currentChar) -
hasDecimalChar
public static boolean hasDecimalChar(char[] chars, boolean negative) -
isLong
public static boolean isLong(char[] digitChars) -
isLong
public static boolean isLong(char[] digitChars, int offset, int len) -
isInteger
public static boolean isInteger(char[] digitChars) -
isInteger
public static boolean isInteger(char[] digitChars, int offset, int len) -
parseInt
public static int parseInt(char[] digitChars) -
parseIntFromTo
public static int parseIntFromTo(char[] digitChars, int offset, int to) -
parseIntFromToIgnoreDot
public static int parseIntFromToIgnoreDot(char[] digitChars, int offset, int to) -
parseLongFromToIgnoreDot
public static long parseLongFromToIgnoreDot(char[] digitChars, int offset, int to) -
parseLongFromTo
public static long parseLongFromTo(char[] digitChars, int offset, int to) -
parseLong
public static long parseLong(char[] digitChars) -
parseJsonNumber
-
parseJsonNumber
-
isNumberDigit
public static boolean isNumberDigit(int c) -
isDelimiter
protected static boolean isDelimiter(int c) -
parseJsonNumber
-
parseBigDecimal
-
parseFloat
public static float parseFloat(char[] buffer, int from, int to) -
parseDouble
public static double parseDouble(char[] buffer, int from, int to) -
skipWhiteSpace
public static int skipWhiteSpace(char[] array, int index, int length) -
readNumber
public static char[] readNumber(char[] array, int idx, int len) -
errorDetails
-
debugCharDescription
-