Method Slice
Slice()
Returns a sliced buffer that shares its content with this buffer.
The sliced buffer's capacity will be this buffer's Remaining, and it's zero position will correspond to this buffer's current position. The new buffer's position will be 0, limit will be its capacity, and its mark is cleared. The new buffer's read-only property and byte order are the same as this buffer's.
The new buffer shares its content with this buffer, which means either buffer's change of content will be visible to the other. The two buffer's position, limit and mark are independent.
Declaration
public abstract ByteBuffer Slice()
Returns
Type | Description |
---|---|
ByteBuffer | A sliced buffer that shares its content with this buffer. |