Name: rmT116609 Date: 10/09/2003
A DESCRIPTION OF THE REQUEST :
NIO team
Just a small functionnal extension that could be useful for people dealing with
non java native file type (i.e EBCDIC or COBOL files).
1/ java.nio.ByteBuffer.clear(byte b)
Add an clear(byte b) method to java.nio.Buffer in order to fill the backing array of bytes if is exists with the same single byte value specified by the parameter b. Useful for implemeting the semantic of the COBOL CHARACTER string which states that strings (which are bytes) are padded by SPACE (0x20 in ASCII or 0x40 in EBCDIC).
2/java.nio.ByteBuffer.allocate(int capacity, byte b)
For the same reason as previously stated, but for the initial allocation and initialization.
JUSTIFICATION :
This small enhancement could help in increasing lisibility and abstraction of the usage of a ByteBuffer
(Incident Review ID: 209832)
======================================================================