public class Decimal
extends java.lang.Object
java.math.BigDecimal, double, or
long.| Modifier and Type | Field | Description |
|---|---|---|
private static MessageUtil |
msgutil |
|
static int |
PACKED_DECIMAL |
Packed Decimal representation
|
private static int[][] |
tenRadixMagnitude |
| Modifier | Constructor | Description |
|---|---|---|
private |
Decimal() |
| Modifier and Type | Method | Description |
|---|---|---|
static int |
bigDecimalToPackedDecimalBytes(byte[] buffer,
int offset,
java.math.BigDecimal b,
int declaredPrecision,
int declaredScale) |
Write a Java
java.math.BigDecimal to packed decimal bytes. |
private static int[] |
computeMagnitude(int[] input) |
Compute the int array of magnitude from input value segments.
|
(package private) static java.math.BigDecimal |
getBigDecimal(byte[] buffer,
int offset,
int precision,
int scale) |
Build a
java.math.BigDecimal from a fixed point decimal byte representation. |
(package private) static double |
getDouble(byte[] buffer,
int offset,
int precision,
int scale) |
Build a Java
double from a fixed point decimal byte representation. |
(package private) static long |
getLong(byte[] buffer,
int offset,
int precision,
int scale) |
Build a Java
long from a fixed point decimal byte representation. |
private static int |
packedNybblesToInt(byte[] buffer,
int offset,
int startNybble,
int numberOfNybbles) |
Convert a range of packed nybbles (up to 9 digits without overflow) to an int.
|
private static long |
packedNybblesToLong(byte[] buffer,
int offset,
int startNybble,
int numberOfNybbles) |
Convert a range of packed nybbles (up to 18 digits without overflow) to a long.
|
public static final int PACKED_DECIMAL
private static final MessageUtil msgutil
private static final int[][] tenRadixMagnitude
private static final int packedNybblesToInt(byte[] buffer,
int offset,
int startNybble,
int numberOfNybbles)
private static final long packedNybblesToLong(byte[] buffer,
int offset,
int startNybble,
int numberOfNybbles)
private static final int[] computeMagnitude(int[] input)
static java.math.BigDecimal getBigDecimal(byte[] buffer,
int offset,
int precision,
int scale)
java.math.BigDecimal from a fixed point decimal byte representation.java.lang.IllegalArgumentException - if the specified representation is not recognized.static double getDouble(byte[] buffer,
int offset,
int precision,
int scale)
double from a fixed point decimal byte representation.java.lang.IllegalArgumentException - if the specified representation is not recognized.static long getLong(byte[] buffer,
int offset,
int precision,
int scale)
long from a fixed point decimal byte representation.java.lang.IllegalArgumentException - if the specified representation is not recognized.java.lang.ArithmeticException - if value is too large for a longpublic static final int bigDecimalToPackedDecimalBytes(byte[] buffer,
int offset,
java.math.BigDecimal b,
int declaredPrecision,
int declaredScale)
throws SqlException
java.math.BigDecimal to packed decimal bytes.SqlExceptionApache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.