|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.client.am.Decimal
public class Decimal
Converters from fixed point decimal bytes to java.math.BigDecimal, double, or
long.
| Field Summary | |
|---|---|
private static MessageUtil |
msgutil
|
static int |
PACKED_DECIMAL
Packed Decimal representation |
private static int[][] |
tenRadixMagnitude
|
| Constructor Summary | |
|---|---|
private |
Decimal()
|
| Method Summary | |
|---|---|
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. |
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. |
static double |
getDouble(byte[] buffer,
int offset,
int precision,
int scale)
Build a Java double from a fixed point decimal byte representation. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PACKED_DECIMAL
private static final MessageUtil msgutil
private static final int[][] tenRadixMagnitude
| Constructor Detail |
|---|
private Decimal()
| Method Detail |
|---|
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)
public static final java.math.BigDecimal getBigDecimal(byte[] buffer,
int offset,
int precision,
int scale)
throws java.io.UnsupportedEncodingException
java.math.BigDecimal from a fixed point decimal byte representation.
java.lang.IllegalArgumentException - if the specified representation is not recognized.
java.io.UnsupportedEncodingException
public static final double getDouble(byte[] buffer,
int offset,
int precision,
int scale)
throws java.io.UnsupportedEncodingException
double from a fixed point decimal byte representation.
java.lang.IllegalArgumentException - if the specified representation is not recognized.
java.io.UnsupportedEncodingException
public static final long getLong(byte[] buffer,
int offset,
int precision,
int scale)
throws java.io.UnsupportedEncodingException
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 long
java.io.UnsupportedEncodingException
public 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.
SqlException
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||