ByteBuffer.duplicate

Creates a new byte buffer that shares this buffer's content.

<p> The content of the new buffer will be that of this buffer. Changes to this buffer's content will be visible in the new buffer, and vice versa; the two buffers' position, limit, and mark values will be independent.

<p> The new buffer's capacity, limit, position, and mark values will be identical to those of this buffer. The new buffer will be direct if, and only if, this buffer is direct, and it will be read-only if, and only if, this buffer is read-only. </p>

@return The new byte buffer

class ByteBuffer
abstract
duplicate
()

Meta