@Test public void OneMessageTransferCountTest(){ ByteBuffer byteBuffer = ByteBuffer.allocate(20); byteBuffer.putInt(20); SelectMappedBufferResult selectMappedBufferResult = new SelectMappedBufferResult(0,byteBuffer,20,new MappedFile()); OneMessageTransfer manyMessageTransfer = new OneMessageTransfer(byteBuffer,selectMappedBufferResult); Assert.assertEquals(manyMessageTransfer.count(),40); }
@Override public long count() { return this.byteBufferHeader.limit() + this.selectMappedBufferResult.getSize(); }
OneMessageTransfer extends AbstractReferenceCounted implements FileRegion { @Override public long count() { return this.byteBufferHeader.limit() + this.selectMappedBufferResult.getSize(); } }
OneMessageTransfer extends AbstractReferenceCounted implements FileRegion { @Override public long count() { return this.byteBufferHeader.limit() + this.selectMappedBufferResult.getSize(); } OneMessageTransfer(ByteBuffer byteBufferHeader, SelectMappedBufferResult selectMappedBufferResult); }
OneMessageTransfer extends AbstractReferenceCounted implements FileRegion { @Override public long count() { return this.byteBufferHeader.limit() + this.selectMappedBufferResult.getSize(); } OneMessageTransfer(ByteBuffer byteBufferHeader, SelectMappedBufferResult selectMappedBufferResult); @Override long position(); @Override long transfered(); @Override long count(); @Override long transferTo(WritableByteChannel target, long position); void close(); }
OneMessageTransfer extends AbstractReferenceCounted implements FileRegion { @Override public long count() { return this.byteBufferHeader.limit() + this.selectMappedBufferResult.getSize(); } OneMessageTransfer(ByteBuffer byteBufferHeader, SelectMappedBufferResult selectMappedBufferResult); @Override long position(); @Override long transfered(); @Override long count(); @Override long transferTo(WritableByteChannel target, long position); void close();  }