net.neoremind.fountain.util
类 UnsignedNumberHelper

java.lang.Object
  继承者 net.neoremind.fountain.util.UnsignedNumberHelper

public abstract class UnsignedNumberHelper
extends Object

转换数字为无符号的工具类

作者:
hexiufeng

构造方法摘要
UnsignedNumberHelper()
           
 
方法摘要
static void configCharset(String charset)
           
static String convertByteArray2String(byte[] buf)
           
static String convertByteArray2String(byte[] buf, String chset)
           
static long convertLittleEndianLong(ByteBuffer buff, int size)
           
static BigInteger convertLittleEndianLongByteArray2BigInteger(byte[] buf)
           
static long convertLittleEndianUnsignedInt(ByteBuffer buff, int size)
           
static int toUnsignedByte(int value)
           
static long toUnsignedInt(long value)
          用long数据类型表示无符号的int,把高4个字节置为0
 
从类 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.