net.neoremind.fountain.util
类 UnsignedNumberHelper
java.lang.Object
net.neoremind.fountain.util.UnsignedNumberHelper
public abstract class UnsignedNumberHelper
- extends Object
转换数字为无符号的工具类
- 作者:
- hexiufeng
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnsignedNumberHelper
public UnsignedNumberHelper()
toUnsignedInt
public static long toUnsignedInt(long value)
- 用long数据类型表示无符号的int,把高4个字节置为0
- 参数:
value -
- 返回:
configCharset
public static void configCharset(String charset)
toUnsignedByte
public static int toUnsignedByte(int value)
convertLittleEndianLongByteArray2BigInteger
public static BigInteger convertLittleEndianLongByteArray2BigInteger(byte[] buf)
convertByteArray2String
public static String convertByteArray2String(byte[] buf)
convertByteArray2String
public static String convertByteArray2String(byte[] buf,
String chset)
convertLittleEndianUnsignedInt
public static long convertLittleEndianUnsignedInt(ByteBuffer buff,
int size)
convertLittleEndianLong
public static long convertLittleEndianLong(ByteBuffer buff,
int size)
Copyright © 2016 neoremind. All rights reserved.