the java.nio.ByteBuffer API has no analagous method(s) to System.arraycopy(),
or bcopy()/memmove() on UNIX(tm) systems.
Although it is possible to effect the same behavior using the same API, it
is onerous and is likely to incur programmer error ... (the workaround
requires the use of position(), limit(), slice() and bulk get()/put())
The addition of two methods:
static void <copy>(ByteBuffer src, ByteBuffer, dst, int len);
and (more importantly):
static void <copy>(ByteBuffer src, int srcPos, ByteBuffer dst, int dstPos, int len);
would greatly improve the situation.
note: copies/moves between direct and non-direct buffers is required
note: an IncompatibleByteOrderException should be thrown if the byte orders
of the dst and src do not match ...
###@###.### 10/6/04 16:27 GMT
or bcopy()/memmove() on UNIX(tm) systems.
Although it is possible to effect the same behavior using the same API, it
is onerous and is likely to incur programmer error ... (the workaround
requires the use of position(), limit(), slice() and bulk get()/put())
The addition of two methods:
static void <copy>(ByteBuffer src, ByteBuffer, dst, int len);
and (more importantly):
static void <copy>(ByteBuffer src, int srcPos, ByteBuffer dst, int dstPos, int len);
would greatly improve the situation.
note: copies/moves between direct and non-direct buffers is required
note: an IncompatibleByteOrderException should be thrown if the byte orders
of the dst and src do not match ...
###@###.### 10/6/04 16:27 GMT