Package 

Class ByteArrayUtils

    • Method Summary

      Modifier and Type Method Description
      static int readUint16(ByteArrayBuffer bab, int off) Read a unsigned 16-bit value from a byte array buffer at a specifiedoffset as an int.
      static int readUint16(Array<byte> buf, int off) Read a unsigned 16-bit value from a byte array at a specified offset asan int.
      static void writeUint16(ByteArrayBuffer bab, int off, int value) Writes a 16-bit unsigned integer into a byte array buffer at a specifiedoffset.
      static void writeUint16(Array<byte> buf, int off, int value) Writes a 16-bit unsigned integer into a byte array at a specified offset.
      static int readUint24(ByteArrayBuffer bab, int off) Read a unsigned 24-bit value from a byte array buffer at a specifiedoffset as an int.
      static int readUint24(Array<byte> buf, int off) Read a unsigned 24-bit value from a byte array at a specified offset asan int.
      static void writeUint24(ByteArrayBuffer bab, int off, int value) Writes a 24-bit unsigned integer into a byte array buffer at a specifiedoffset.
      static void writeUint24(Array<byte> buf, int off, int value) Writes a 24-bit unsigned integer into a byte array at a specified offset.
      static long readUint32(ByteArrayBuffer bab, int off) Read a unsigned 32-bit value from a byte array buffer at a specifiedoffset as a {@code long}.
      static long readUint32(Array<byte> buf, int off) Read a unsigned 32-bit value from a byte array at a specified offset asa {@code long}.
      static int readInt(ByteArrayBuffer bab, int off) Read a 32-bit integer from a byte array buffer at a specified offset.
      static int readInt(Array<byte> buf, int off) Read a 32-bit integer from a byte array at a specified offset.
      static void writeInt(ByteArrayBuffer bab, int off, int value) Writes an {@code int} into a byte array buffer at a specified offset.
      static void writeInt(Array<byte> buf, int off, int value) Writes an {@code int} into a byte array at a specified offset.
      static short readShort(ByteArrayBuffer bab, int off) Read a 16-bit signed integer from a byte array buffer at a specifiedoffset into a {@code short}.
      static short readShort(Array<byte> buf, int off) Read a 16-bit signed integer from a byte array at a specified offsetinto a {@code short}.
      static void writeShort(ByteArrayBuffer bab, int off, short value) Writes a {@code short} into a byte array buffer at a specified offset.
      static void writeShort(Array<byte> buf, int off, short value) Writes a {@code short} into a byte array at a specified offset.
      • Methods inherited from class java.lang.Object

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

      • readUint16

         static int readUint16(ByteArrayBuffer bab, int off)

        Read a unsigned 16-bit value from a byte array buffer at a specifiedoffset as an int.

        Parameters:
        bab - the buffer from which to read.
        off - start offset of the unsigned short
      • readUint16

         static int readUint16(Array<byte> buf, int off)

        Read a unsigned 16-bit value from a byte array at a specified offset asan int.

        Parameters:
        buf - the buffer from which to read.
        off - start offset of the unsigned short
      • writeUint16

         static void writeUint16(ByteArrayBuffer bab, int off, int value)

        Writes a 16-bit unsigned integer into a byte array buffer at a specifiedoffset.

        Parameters:
        bab - the byte array to write to.
        value - the value to write.
      • writeUint16

         static void writeUint16(Array<byte> buf, int off, int value)

        Writes a 16-bit unsigned integer into a byte array at a specified offset.

        Parameters:
        buf - the byte array to write to.
        value - the value to write.
      • readUint24

         static int readUint24(ByteArrayBuffer bab, int off)

        Read a unsigned 24-bit value from a byte array buffer at a specifiedoffset as an int.

        Parameters:
        bab - the buffer from which to read.
        off - start offset of the unsigned short
      • readUint24

         static int readUint24(Array<byte> buf, int off)

        Read a unsigned 24-bit value from a byte array at a specified offset asan int.

        Parameters:
        buf - the buffer from which to read.
        off - start offset of the unsigned short
      • writeUint24

         static void writeUint24(ByteArrayBuffer bab, int off, int value)

        Writes a 24-bit unsigned integer into a byte array buffer at a specifiedoffset.

        Parameters:
        bab - the byte array to write to.
        value - the value to write.
      • writeUint24

         static void writeUint24(Array<byte> buf, int off, int value)

        Writes a 24-bit unsigned integer into a byte array at a specified offset.

        Parameters:
        buf - the byte array to write to.
        value - the value to write.
      • readUint32

         static long readUint32(ByteArrayBuffer bab, int off)

        Read a unsigned 32-bit value from a byte array buffer at a specifiedoffset as a {@code long}.

        Parameters:
        bab - the buffer from which to read.
        off - start offset of the unsigned short
      • readUint32

         static long readUint32(Array<byte> buf, int off)

        Read a unsigned 32-bit value from a byte array at a specified offset asa {@code long}.

        Parameters:
        buf - the buffer from which to read.
        off - start offset of the unsigned short
      • readInt

         static int readInt(ByteArrayBuffer bab, int off)

        Read a 32-bit integer from a byte array buffer at a specified offset.

        Parameters:
        bab - the byte array from which to read.
        off - start offset in the buffer of the integer to be read.
      • readInt

         static int readInt(Array<byte> buf, int off)

        Read a 32-bit integer from a byte array at a specified offset.

        Parameters:
        buf - the byte array from which to read.
        off - start offset in the buffer of the integer to be read.
      • writeInt

         static void writeInt(ByteArrayBuffer bab, int off, int value)

        Writes an {@code int} into a byte array buffer at a specified offset.

        Parameters:
        bab - the byte array to write to.
        value - the value to write.
      • writeInt

         static void writeInt(Array<byte> buf, int off, int value)

        Writes an {@code int} into a byte array at a specified offset.

        Parameters:
        buf - the byte array to write to.
        value - the value to write.
      • readShort

         static short readShort(ByteArrayBuffer bab, int off)

        Read a 16-bit signed integer from a byte array buffer at a specifiedoffset into a {@code short}.

        Parameters:
        bab - the byte array from which to read.
        off - start offset in the buffer of the integer to be read.
      • readShort

         static short readShort(Array<byte> buf, int off)

        Read a 16-bit signed integer from a byte array at a specified offsetinto a {@code short}.

        Parameters:
        buf - the byte array from which to read.
        off - start offset in the buffer of the integer to be read.
      • writeShort

         static void writeShort(ByteArrayBuffer bab, int off, short value)

        Writes a {@code short} into a byte array buffer at a specified offset.

        Parameters:
        bab - the byte array to write to.
        value - the value to write.
      • writeShort

         static void writeShort(Array<byte> buf, int off, short value)

        Writes a {@code short} into a byte array at a specified offset.

        Parameters:
        buf - the byte array to write to.
        value - the value to write.