public class FloatingPoint extends Object
float, double, or
java.math.BigDecimal.| Modifier and Type | Field and Description |
|---|---|
static int |
IEEE_754_FLOATING_POINT
Supported Unix Big Endian IEEE 754 floating point representation.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
doubleToIeee754Bytes(byte[] buffer,
int offset,
double d)
Write a Java
double to an 8-byte double precision floating point representation. |
static void |
floatToIeee754Bytes(byte[] buffer,
int offset,
float f)
Write a Java
float to a 4-byte floating point representation. |
static double |
getDouble(byte[] buffer,
int offset)
Build a Java double from an 8-byte floating point representation.
|
static float |
getFloat(byte[] buffer,
int offset)
Build a Java float from a 4-byte floating point representation.
|
public static final int IEEE_754_FLOATING_POINT
public static final float getFloat(byte[] buffer,
int offset)
IllegalArgumentException - if the specified representation is not recognized.public static final double getDouble(byte[] buffer,
int offset)
IllegalArgumentException - if the specified representation is not recognized.public static final void floatToIeee754Bytes(byte[] buffer,
int offset,
float f)
float to a 4-byte floating point representation.public static final void doubleToIeee754Bytes(byte[] buffer,
int offset,
double d)
double to an 8-byte double precision floating point representation.Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.