What's the magic behind lenBuffer and incomingBuffer?

2010-10-21 Thread Thomas Koch
Hi, inside ClientCnxn.SendThread we have final ByteBuffer lenBuffer = ByteBuffer.allocateDirect(4); ByteBuffer incomingBuffer = lenBuffer; So incomingBuffer and lenBuffer do refer to the same object. There are several other places where lenBuffer is again assigned to incomingBuffer.

Re: What's the magic behind lenBuffer and incomingBuffer?

2010-10-21 Thread Benjamin Reed
look in readLength(). incomingBuffer is set to a newly allocated ByteBuffer. ben On 10/21/2010 07:52 AM, Thomas Koch wrote: Hi, inside ClientCnxn.SendThread we have final ByteBuffer lenBuffer = ByteBuffer.allocateDirect(4); ByteBuffer incomingBuffer = lenBuffer; So