public class BitConverter extends Object
| Constructor and Description |
|---|
BitConverter() |
| Modifier and Type | Method and Description |
|---|---|
static long |
doubleToInt64Bits(double x) |
static byte[] |
getBytes(boolean x) |
static byte[] |
getBytes(char c) |
static byte[] |
getBytes(double x) |
static byte[] |
getBytes(float x) |
static byte[] |
getBytes(int x) |
static byte[] |
getBytes(long x) |
static byte[] |
getBytes(short x) |
static byte[] |
getBytes(String x) |
static double |
int64BitsToDouble(long x) |
boolean |
toBoolean(byte[] bytes,
int index) |
char |
toChar(byte[] bytes,
int index) |
double |
toDouble(byte[] bytes,
int index) |
static short |
toInt16(byte[] bytes,
int index) |
static int |
toInt32(byte[] bytes,
int index) |
static long |
toInt64(byte[] bytes,
int index) |
static float |
toSingle(byte[] bytes,
int index) |
static String |
toString(byte[] bytes) |
static long |
toUInt32(byte[] bytes,
int index) |
public static byte[] getBytes(boolean x)
public static byte[] getBytes(char c)
public static byte[] getBytes(double x)
public static byte[] getBytes(short x)
public static byte[] getBytes(int x)
public static byte[] getBytes(long x)
public static byte[] getBytes(float x)
public static byte[] getBytes(String x)
public static long doubleToInt64Bits(double x)
public static double int64BitsToDouble(long x)
public static short toInt16(byte[] bytes,
int index)
throws IOException
IOExceptionpublic static int toInt32(byte[] bytes,
int index)
throws IOException
IOExceptionpublic static long toUInt32(byte[] bytes,
int index)
throws IOException
IOExceptionpublic static long toInt64(byte[] bytes,
int index)
throws IOException
IOExceptionpublic static float toSingle(byte[] bytes,
int index)
throws IOException
IOExceptionpublic static String toString(byte[] bytes) throws IOException
IOExceptionpublic boolean toBoolean(byte[] bytes,
int index)
throws IOException
IOExceptionpublic char toChar(byte[] bytes,
int index)
throws IOException
IOExceptionpublic double toDouble(byte[] bytes,
int index)
throws IOException
IOExceptionCopyright © 2007–2022 The Apache Software Foundation. All rights reserved.