Sven Reimers sven.reimers at
Sat Sep 26 16:41:51 UTC 2015

Hi all,

what would it take to get JDK-5071718 into 9?

I thought about something like this;

 Creates a new byte buffer whose content is a shared subsequence of this
buffer's content.

The content of the new buffer will start at the given position. The
capacity and limit of the new buffer will be the given length. Changes to
this buffer's content will be visible in the new buffer, and vice versa;
the two buffers' position, limit, and mark values will be independent.

The new buffer's position will be zero, and its mark will be undefined. The
new buffer will be direct if, and only if, this buffer is direct, and it
will be read-only if, and only if, this buffer is read-only.
Returns:The new byte buffer
public abstract ByteBuffer slice(int start, int length)

Probably should emit some exception in case start or start+length are
greater than the underlying buffer length. Any further ideas for required

Seems I need to modify the templates to get this distributed to all the
variants existing - not only ByteBuffer.

Anyone able to guide me and help me get this through - I am willing to
provide implementation and tests if I know where to look for obstacles and


Sven Reimers

* Senior Expert Software Architect
* Java Champion
* NetBeans Dream Team Member:
* Community Leader  NetBeans:
                              Desktop Java:
* JUG Leader JUG Bodensee:
* Duke's Choice Award Winner 2009
* Blog:

More information about the core-libs-dev mailing list