public class EndianUtils extends Object
| 构造器和说明 |
|---|
EndianUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static double |
swapDouble(double value)
Reverses the byte order of the source double value
|
static float |
swapFloat(float value)
Reverses the byte order of the source float value
|
static int |
swapInteger(int value)
Reverses the byte order of the source int value
|
static long |
swapLong(long value)
Reverses the byte order of the source long value
|
static short |
swapShort(short value)
Reverses the byte order of the source short value
|
static StringBuilder |
toCharString(StringBuilder sb,
int i,
int bytes,
char def) |
static String |
toHexString(int i,
boolean littleEndian,
int bytes) |
static String |
toInfoString(int info) |
public static short swapShort(short value)
value - the source valuepublic static int swapInteger(int value)
value - the source valuepublic static long swapLong(long value)
value - the source valuepublic static float swapFloat(float value)
value - the source valuepublic static double swapDouble(double value)
value - the source valuepublic static String toHexString(int i, boolean littleEndian, int bytes)
public static StringBuilder toCharString(StringBuilder sb, int i, int bytes, char def)
public static String toInfoString(int info)
Copyright © 2021. All rights reserved.