com.taobao.metamorphosis.network
类 ByteUtils

java.lang.Object
  继承者 com.taobao.metamorphosis.network.ByteUtils

public final class ByteUtils
extends Object

Utilities for byte process

作者:
dennis

字段摘要
static Charset DEFAULT_CHARSET
           
static String DEFAULT_CHARSET_NAME
           
 
方法摘要
static void byte2hex(byte b, StringBuffer buf)
           
static void getBytes(long i, int index, byte[] buf)
           
static byte[] getBytes(String k)
           
static String getString(byte[] bytes)
           
static void int2hex(int a, StringBuffer str)
           
static void main(String[] args)
           
static int normalizeCapacity(int requestedCapacity)
           
static int setArguments(byte[] bb, int index, Object... args)
           
static void setArguments(com.taobao.gecko.core.buffer.IoBuffer bb, Object... args)
           
static void short2hex(int a, StringBuffer str)
           
static boolean stepBuffer(ByteBuffer buffer, int remaining)
           
static int stringPositiveSize(int x)
           
static int stringPositiveSize(long x)
           
static int stringSize(int x)
           
static int stringSize(long x)
           
static String toHexString(byte[] bytes)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

DEFAULT_CHARSET_NAME

public static final String DEFAULT_CHARSET_NAME
另请参见:
常量字段值

DEFAULT_CHARSET

public static final Charset DEFAULT_CHARSET
方法详细信息

getBytes

public static final byte[] getBytes(String k)

setArguments

public static final void setArguments(com.taobao.gecko.core.buffer.IoBuffer bb,
                                      Object... args)

setArguments

public static final int setArguments(byte[] bb,
                                     int index,
                                     Object... args)

normalizeCapacity

public static final int normalizeCapacity(int requestedCapacity)

stepBuffer

public static final boolean stepBuffer(ByteBuffer buffer,
                                       int remaining)

getString

public static String getString(byte[] bytes)

byte2hex

public static void byte2hex(byte b,
                            StringBuffer buf)

int2hex

public static void int2hex(int a,
                           StringBuffer str)

short2hex

public static void short2hex(int a,
                             StringBuffer str)

getBytes

public static void getBytes(long i,
                            int index,
                            byte[] buf)

stringPositiveSize

public static final int stringPositiveSize(int x)

main

public static void main(String[] args)

stringSize

public static final int stringSize(int x)

stringSize

public static final int stringSize(long x)

stringPositiveSize

public static final int stringPositiveSize(long x)

toHexString

public static String toHexString(byte[] bytes)


Copyright © 2010–2013. All rights reserved.