Class NumberOutput
java.lang.Object
com.fasterxml.jackson.dataformat.csv.impl.NumberOutput
Helper class for efficient writing of numeric values
NOTE: modified from Jackson Core's similar functionality
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static int
private static final char[]
private static final byte[]
private static final char[]
private static long
private static int
private static long
private static final char
private static final String
private static long
private static long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
calcLongStrLength
(long posValue) Pre-conditions: posValue is positive, and larger than Integer.MAX_VALUE (about 2 billions).private static int
outputFullTriplet
(int triplet, char[] buffer, int offset) static int
outputInt
(int value, char[] buffer, int offset) private static int
outputLeadingTriplet
(int triplet, char[] buffer, int offset) static int
outputLong
(long value, char[] buffer, int offset) static String
toString
(double value) static String
toString
(float value)
-
Field Details
-
NULL_CHAR
private static final char NULL_CHAR- See Also:
-
MILLION
private static int MILLION -
BILLION
private static int BILLION -
TEN_BILLION_L
private static long TEN_BILLION_L -
THOUSAND_L
private static long THOUSAND_L -
MIN_INT_AS_LONG
private static long MIN_INT_AS_LONG -
MAX_INT_AS_LONG
private static long MAX_INT_AS_LONG -
SMALLEST_LONG
-
LEADING_TRIPLETS
private static final char[] LEADING_TRIPLETS -
FULL_TRIPLETS
private static final char[] FULL_TRIPLETS -
FULL_TRIPLETS_B
private static final byte[] FULL_TRIPLETS_B
-
-
Constructor Details
-
NumberOutput
public NumberOutput()
-
-
Method Details
-
outputInt
public static int outputInt(int value, char[] buffer, int offset) - Returns:
- Offset within buffer after outputting int
-
outputLong
public static int outputLong(long value, char[] buffer, int offset) - Returns:
- Offset within buffer after outputting int
-
toString
-
toString
-
outputLeadingTriplet
private static int outputLeadingTriplet(int triplet, char[] buffer, int offset) -
outputFullTriplet
private static int outputFullTriplet(int triplet, char[] buffer, int offset) -
calcLongStrLength
private static int calcLongStrLength(long posValue) Pre-conditions: posValue is positive, and larger than Integer.MAX_VALUE (about 2 billions).
-