public class ByteFunctions extends Object
| コンストラクタ | 説明 |
|---|---|
ByteFunctions() |
| 修飾子とタイプ | メソッド | 説明 |
|---|---|---|
static float |
byte_to_float(byte[] b) |
Converts a 4-byte byte array to a float value.
|
static float |
byte_to_float_le(byte[] b) |
Converts a 4-byte byte array to a float value.
|
static short |
byte_to_short(byte[] b) |
Converts a 2-byte byte array to a short value.
|
static short |
byte_to_short_le(byte[] b) |
Converts a 2-byte byte array to a short value.
|
static int |
byte_to_ushort(byte[] b) |
Converts a 2-byte byte array to an unsigned short value.
|
static int |
byte_to_ushort_le(byte[] b) |
Converts a 2-byte byte array to an unsigned short value.
|
static byte[] |
float_to_byte(float f) |
Converts a float value to a 4-byte byte array.
|
static byte[] |
float_to_byte_le(float f) |
Converts a float value to a 4-byte byte array.
|
static byte[] |
short_to_byte(short s) |
Converts a short value to a 2-byte byte array.
|
static byte[] |
short_to_byte_le(short s) |
Converts a short value to a 2-byte byte array.
|
static byte[] |
ushort_to_byte(int s) |
Converts an unsigned short value to a 2-byte byte array.
|
static byte[] |
ushort_to_byte_le(int s) |
Converts an unsigned short value to a 2-byte byte array.
|
public static float byte_to_float(byte[] b)
b - A 4-byte big-endian byte arraypublic static float byte_to_float_le(byte[] b)
b - A 4-byte little-endian byte arraybyte_to_float(byte[])public static byte[] float_to_byte(float f)
f - A float valuepublic static byte[] float_to_byte_le(float f)
f - A float valuefloat_to_byte(float)public static short byte_to_short(byte[] b)
b - A 2-byte byte arraypublic static short byte_to_short_le(byte[] b)
b - A 2-byte little-endian byte arraybyte_to_short(byte[])public static byte[] short_to_byte(short s)
s - A short valuepublic static byte[] short_to_byte_le(short s)
s - A short valueshort_to_byte(short)public static int byte_to_ushort(byte[] b)
b - A 2-byte byte arraypublic static int byte_to_ushort_le(byte[] b)
b - A 2-byte little-endian byte arraybyte_to_ushort(byte[])public static byte[] ushort_to_byte(int s)
s - An unsigned short valuepublic static byte[] ushort_to_byte_le(int s)
s - An unsigned short valueushort_to_byte(int)Copyright © 2019. All rights reserved.