CSR :
|
|
Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
JDK-8226802 :
|
Name: rmT116609 Date: 04/08/2004 A DESCRIPTION OF THE REQUEST : The ByteBuffer class does not support the writing of byte arrays at to an absolute position within a ByteBuffer. JUSTIFICATION : - Completeness - Allows multiple threads to do efficient bulk updates to the same ByteBuffer. - Using slice() and duplicate() to get the same functionality will create a large amount of unwanted references to the oringial buffer. This makes it difficult to be certain that all references are set null to allow the MappedByteBuffer to be Garbage Collected. My application requires unmap functionality, which I have implemented using the Garbage Collector and Phantom References (due to no unmap method). EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - 4 new methods added to the ByteBuffer class: public ByteBuffer get(int index, byte[] dst); public ByteBuffer get(int index, byte[] dst, int offset, int length); public ByteBuffer put(int index, byte[] src); public ByteBuffer put(int index, byte[] src, int offset, int length); ACTUAL - The bulk get and put methods should behave like the absolute primitive get/put methods, but efficently updating the Buffer. CUSTOMER SUBMITTED WORKAROUND : Using slice() and duplicate(), but this is not appropriate for my application. (Incident Review ID: 239468) ======================================================================
|