The new buffer's position will be position() + start
, limit will be position() + end
, capacity will be same as this buffer. The new buffer's readonly property and byte order are same as this buffer.
The new buffer shares 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.
@param start The start index of the sub-sequence, referenced from the current buffer position. Must not be less than zero and not greater than the value obtained from a call toremaining()
.
@param end The end index of the sub-sequence, referenced from the current buffer position. Must not be less than start
and not be greater than the value obtained from a call to remaining()
@return A new char buffer represents a sub-sequence of this buffer'scurrent remaining content.
@exception IndexOutOfBoundsException If either start
or end
is invalid
|
|