@Test public void ManyMessageTransferPosTest(){ ByteBuffer byteBuffer = ByteBuffer.allocate(20); byteBuffer.putInt(20); GetMessageResult getMessageResult = new GetMessageResult(); ManyMessageTransfer manyMessageTransfer = new ManyMessageTransfer(byteBuffer,getMessageResult); Assert.assertEquals(manyMessageTransfer.position(),4); }
@Override public long position() { int pos = byteBufferHeader.position(); List<ByteBuffer> messageBufferList = this.getMessageResult.getMessageBufferList(); for (ByteBuffer bb : messageBufferList) { pos += bb.position(); } return pos; }
ManyMessageTransfer extends AbstractReferenceCounted implements FileRegion { @Override public long position() { int pos = byteBufferHeader.position(); List<ByteBuffer> messageBufferList = this.getMessageResult.getMessageBufferList(); for (ByteBuffer bb : messageBufferList) { pos += bb.position(); } return pos; } }
ManyMessageTransfer extends AbstractReferenceCounted implements FileRegion { @Override public long position() { int pos = byteBufferHeader.position(); List<ByteBuffer> messageBufferList = this.getMessageResult.getMessageBufferList(); for (ByteBuffer bb : messageBufferList) { pos += bb.position(); } return pos; } ManyMessageTransfer(ByteBuffer byteBufferHeader, GetMessageResult getMessageResult); }
ManyMessageTransfer extends AbstractReferenceCounted implements FileRegion { @Override public long position() { int pos = byteBufferHeader.position(); List<ByteBuffer> messageBufferList = this.getMessageResult.getMessageBufferList(); for (ByteBuffer bb : messageBufferList) { pos += bb.position(); } return pos; } ManyMessageTransfer(ByteBuffer byteBufferHeader, GetMessageResult getMessageResult); @Override long position(); @Override long transfered(); @Override long count(); @Override long transferTo(WritableByteChannel target, long position); void close(); }
ManyMessageTransfer extends AbstractReferenceCounted implements FileRegion { @Override public long position() { int pos = byteBufferHeader.position(); List<ByteBuffer> messageBufferList = this.getMessageResult.getMessageBufferList(); for (ByteBuffer bb : messageBufferList) { pos += bb.position(); } return pos; } ManyMessageTransfer(ByteBuffer byteBufferHeader, GetMessageResult getMessageResult); @Override long position(); @Override long transfered(); @Override long count(); @Override long transferTo(WritableByteChannel target, long position); void close();  }