Class 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 void clear​(java.nio.ByteBuffer[] buffers)  
      static void flip​(java.nio.ByteBuffer[] buffers)  
      static java.nio.ByteBuffer gather​(java.nio.ByteBuffer[] buffers)  
      static boolean hasRemaining​(java.nio.ByteBuffer[] buffers)
      查看ByteBuffer数组是否还有剩余
      static java.nio.ByteBuffer increaseBufferCapatity​(java.nio.ByteBuffer byteBuffer)  
      static int indexOf​(java.nio.ByteBuffer buffer, java.nio.ByteBuffer pattern)  
      static int indexOf​(java.nio.ByteBuffer buffer, java.nio.ByteBuffer pattern, int offset)  
      static int remaining​(java.nio.ByteBuffer[] buffers)  
      static java.lang.String toHex​(byte b)  
      static int uByte​(byte b)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ByteBufferUtils

        public ByteBufferUtils()
    • 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)