Package com.fasterxml.jackson.core.io
Class NumberOutput
- java.lang.Object
-
- com.fasterxml.jackson.core.io.NumberOutput
-
public final class NumberOutput extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description NumberOutput()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
notFinite(double value)
Helper method to verify whether givendouble
value is finite (regular rational number} or not (NaN or Infinity).static boolean
notFinite(float value)
Helper method to verify whether givenfloat
value is finite (regular rational number} or not (NaN or Infinity).static int
outputInt(int v, byte[] b, int off)
static int
outputInt(int v, char[] b, int off)
Method for appending value of givenint
value into specifiedchar[]
.static int
outputLong(long v, byte[] b, int off)
static int
outputLong(long v, char[] b, int off)
Method for appending value of givenlong
value into specifiedchar[]
.static java.lang.String
toString(double v)
static java.lang.String
toString(float v)
static java.lang.String
toString(int v)
static java.lang.String
toString(long v)
-
-
-
Method Detail
-
outputInt
public static int outputInt(int v, char[] b, int off)
Method for appending value of givenint
value into specifiedchar[]
.NOTE: caller must guarantee that the output buffer has enough room for String representation of the value.
- Parameters:
v
- Value to append to bufferb
- Buffer to append value to: caller must guarantee there is enough roomoff
- Offset within output buffer (b
) to append number at- Returns:
- Offset within buffer after outputting
int
-
outputInt
public static int outputInt(int v, byte[] b, int off)
-
outputLong
public static int outputLong(long v, char[] b, int off)
Method for appending value of givenlong
value into specifiedchar[]
.NOTE: caller must guarantee that the output buffer has enough room for String representation of the value.
- Parameters:
v
- Value to append to bufferb
- Buffer to append value to: caller must guarantee there is enough roomoff
- Offset within output buffer (b
) to append number at- Returns:
- Offset within buffer after outputting
long
-
outputLong
public static int outputLong(long v, byte[] b, int off)
-
toString
public static java.lang.String toString(int v)
-
toString
public static java.lang.String toString(long v)
-
toString
public static java.lang.String toString(double v)
-
toString
public static java.lang.String toString(float v)
-
notFinite
public static boolean notFinite(double value)
Helper method to verify whether givendouble
value is finite (regular rational number} or not (NaN or Infinity).- Parameters:
value
-double
value to check- Returns:
- True if number is NOT finite (is Infinity or NaN); false otherwise Since 2.10
-
notFinite
public static boolean notFinite(float value)
Helper method to verify whether givenfloat
value is finite (regular rational number} or not (NaN or Infinity).- Parameters:
value
-float
value to check- Returns:
- True if number is NOT finite (is Infinity or NaN); false otherwise Since 2.10
-
-