Re: Question about ByteBuffer positions

2010-11-23 Thread Nate McCall
for your own code, I would stay with duplicate(), slice() and similar and just assume we will do something fancier than we currently are one day. The overhead of those methods is really small as it's just pointers to the same underlying buffer. On Tue, Nov 23, 2010 at 5:42 PM, Ed Anuff wrote: > I

Question about ByteBuffer positions

2010-11-23 Thread Ed Anuff
Is it safe to assume that anywhere that you're provided with a ByteBuffer that it's ok to leave it's position wherever you want or should you be calling buffer.duplicate() and working with your copy of the buffer? I've tried to trace anything that calls the new method signatures in AbstractType an