Package com.google.code.yanf4j.util
Class ByteBufferUtils
- java.lang.Object
-
- com.google.code.yanf4j.util.ByteBufferUtils
-
public class ByteBufferUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description ByteBufferUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclear(ByteBuffer[] buffers)static voidflip(ByteBuffer[] buffers)static ByteBuffergather(ByteBuffer[] buffers)static booleanhasRemaining(ByteBuffer[] buffers)查看ByteBuffer数组是否还有剩余static ByteBufferincreaseBufferCapatity(ByteBuffer byteBuffer)static intindexOf(ByteBuffer buffer, ByteBuffer pattern)static intindexOf(ByteBuffer buffer, ByteBuffer pattern, int offset)static intremaining(ByteBuffer[] buffers)static StringtoHex(byte b)static intuByte(byte b)
-
-
-
Method Detail
-
increaseBufferCapatity
public static final ByteBuffer increaseBufferCapatity(ByteBuffer byteBuffer)
- Parameters:
byteBuffer-- Returns:
- *
-
flip
public static final void flip(ByteBuffer[] buffers)
-
gather
public static final ByteBuffer gather(ByteBuffer[] buffers)
-
remaining
public static final int remaining(ByteBuffer[] buffers)
-
clear
public static final void clear(ByteBuffer[] buffers)
-
toHex
public static final String toHex(byte b)
-
indexOf
public static final int indexOf(ByteBuffer buffer, ByteBuffer pattern)
-
indexOf
public static final int indexOf(ByteBuffer buffer, ByteBuffer pattern, int offset)
-
hasRemaining
public static final boolean hasRemaining(ByteBuffer[] buffers)
查看ByteBuffer数组是否还有剩余- Parameters:
buffers- ByteBuffers- Returns:
- have remaining
-
uByte
public static final int uByte(byte b)
-
-