JDK-6174965 : (bf) ByteBuffer would benefit from (optional) absolute bulk put()/get() methods)
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 6
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • OS: other
  • CPU: generic
  • Submitted: 2004-10-06
  • Updated: 2018-02-07
  • Resolved: 2018-02-07
Related Reports
Relates :  
Description
The current java.nio.ByteBuffer API lacks absolute (bulk) put(byte[] ...) and
gtet(byte[] ...) method signatures.

While it is possible to workaround this missing functionality it is somewhat
onerous and is liable to programmer error (since the developer has to play
with the target ByteBuffer's position and limit pointers).

The simple addition the appropriate method signatures providing absolute,
that is parameterising the buffer offset/position for the operation, 
(rather than position field relative) variants of these APIs would significantly enhance the ease of use of this API.
###@###.### 10/6/04 16:40 GMT