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