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
IOException
public static int toInt32(byte[] bytes, int index) throws IOException
IOException
public static long toUInt32(byte[] bytes, int index) throws IOException
IOException
public static long toInt64(byte[] bytes, int index) throws IOException
IOException
public static float toSingle(byte[] bytes, int index) throws IOException
IOException
public static String toString(byte[] bytes) throws IOException
IOException
public boolean toBoolean(byte[] bytes, int index) throws IOException
IOException
public char toChar(byte[] bytes, int index) throws IOException
IOException
public double toDouble(byte[] bytes, int index) throws IOException
IOException
Copyright © 2007–1969 The Apache Software Foundation. All rights reserved.