Add CharBuffer::put(int index, CharSequence csq, int start, int end) to perform a bulk copy of a a sub-sequence of a CharSequence into a CharBuffer at a specified starting offset.
The CharBuffer class already has absolute and relative bulk put methods for CharBuffers and relative bulk put methods for Strings. Relative bulk put methods for CharSequences are already covered by the append methods. An absolute bulk put for CharSequences would round out the API.
--- Original Description ---
Name: rmT116609 Date: 05/08/2003
A DESCRIPTION OF THE REQUEST :
CharBuffer needs a put() method that takes a CharSequence.
JUSTIFICATION :
Right now it has a put(CharBuffer src) and put(String src), but no put(StringBuffer src) method or put(CharSequence src). If one has a CharSequence or a StringBuffer, it first has to turn them into a String before it can be put into a buffer. The specific methods for CharBuffer, String, and StringBuffer are really unecessary if there is a put(CharSequence src), unless they could be implemented more efficiently by knowing the real type of a CharSequence.
(Review ID: 185395)
======================================================================
The CharBuffer class already has absolute and relative bulk put methods for CharBuffers and relative bulk put methods for Strings. Relative bulk put methods for CharSequences are already covered by the append methods. An absolute bulk put for CharSequences would round out the API.
--- Original Description ---
Name: rmT116609 Date: 05/08/2003
A DESCRIPTION OF THE REQUEST :
CharBuffer needs a put() method that takes a CharSequence.
JUSTIFICATION :
Right now it has a put(CharBuffer src) and put(String src), but no put(StringBuffer src) method or put(CharSequence src). If one has a CharSequence or a StringBuffer, it first has to turn them into a String before it can be put into a buffer. The specific methods for CharBuffer, String, and StringBuffer are really unecessary if there is a put(CharSequence src), unless they could be implemented more efficiently by knowing the real type of a CharSequence.
(Review ID: 185395)
======================================================================
- csr for
-
JDK-8318316 (bf) Add CharBuffer absolute bulk put method for CharSequence
-
- Closed
-
- links to
-
Review openjdk/jdk/13744