Class NumberOutput
- java.lang.Object
-
- com.fasterxml.jackson.dataformat.csv.impl.NumberOutput
-
public final class NumberOutput extends java.lang.Object
Helper class for efficient writing of numeric valuesNOTE: modified from Jackson Core's similar functionality
-
-
Field Summary
Fields Modifier and Type Field Description private static int
BILLION
private static char[]
FULL_TRIPLETS
private static byte[]
FULL_TRIPLETS_B
private static char[]
LEADING_TRIPLETS
private static long
MAX_INT_AS_LONG
private static int
MILLION
private static long
MIN_INT_AS_LONG
private static char
NULL_CHAR
private static java.lang.String
SMALLEST_LONG
private static long
TEN_BILLION_L
private static long
THOUSAND_L
-
Constructor Summary
Constructors Constructor Description NumberOutput()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private 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 java.lang.String
toString(double value)
static java.lang.String
toString(float value)
-
-
-
Field Detail
-
NULL_CHAR
private static final char NULL_CHAR
- See Also:
- Constant Field Values
-
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
private static final java.lang.String 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
-
-
Method Detail
-
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
public static java.lang.String toString(double value)
-
toString
public static java.lang.String toString(float value)
-
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).
-
-