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 intprivate static final char[]private static final byte[]private static final char[]private static longprivate static intprivate static longprivate static final charprivate static final Stringprivate static longprivate static long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static intcalcLongStrLength(long posValue) Pre-conditions: posValue is positive, and larger than Integer.MAX_VALUE (about 2 billions).private static intoutputFullTriplet(int triplet, char[] buffer, int offset) static intoutputInt(int value, char[] buffer, int offset) private static intoutputLeadingTriplet(int triplet, char[] buffer, int offset) static intoutputLong(long value, char[] buffer, int offset) static StringtoString(double value) static StringtoString(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).
-