Class ByteBufferUtils

java.lang.Object
com.google.code.yanf4j.util.ByteBufferUtils

public class ByteBufferUtils extends Object
  • Constructor Details

    • ByteBufferUtils

      public ByteBufferUtils()
  • Method Details

    • 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)