ByteBuffer.wrap

Wraps a byte array into a buffer.

<p> The new buffer will be backed by the given byte array; that is, modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity and limit will be <tt>array.length</tt>, its position will be zero, and its mark will be undefined. Its {@link #array backing array} will be the given array, and its {@link #arrayOffset array offset>} will be zero. </p>

@param array The array that will back this buffer

@return The new byte buffer

  1. ByteBuffer wrap(byte[] array, int offset, int length)
  2. ByteBuffer wrap(byte[] array)
    class ByteBuffer
    deprecated static
    wrap
    (
    byte[] array
    )

Meta