Class NumberOutput

java.lang.Object
com.fasterxml.jackson.dataformat.csv.impl.NumberOutput

public final class NumberOutput extends Object
Helper class for efficient writing of numeric values

NOTE: modified from Jackson Core's similar functionality

  • 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

      private static final 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
  • 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

      public static String toString(double value)
    • toString

      public static 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).