@Override public long position() { int pos = byteBufferHeader.position(); List<ByteBuffer> messageBufferList = this.queryMessageResult.getMessageBufferList(); for (ByteBuffer bb : messageBufferList) { pos += bb.position(); } return pos; }
@Override public long transferTo(WritableByteChannel target, long position) throws IOException { if (this.byteBufferHeader.hasRemaining()) { transferred += target.write(this.byteBufferHeader); return transferred; } else { List<ByteBuffer> messageBufferList = this.queryMessageResult.getMessageBufferList(); for (ByteBuffer bb : messageBufferList) { if (bb.hasRemaining()) { transferred += target.write(bb); return transferred; } } } return 0; }
@Override public long position() { int pos = byteBufferHeader.position(); List<ByteBuffer> messageBufferList = this.queryMessageResult.getMessageBufferList(); for (ByteBuffer bb : messageBufferList) { pos += bb.position(); } return pos; }
@Override public long transferTo(WritableByteChannel target, long position) throws IOException { if (this.byteBufferHeader.hasRemaining()) { transferred += target.write(this.byteBufferHeader); return transferred; } else { List<ByteBuffer> messageBufferList = this.queryMessageResult.getMessageBufferList(); for (ByteBuffer bb : messageBufferList) { if (bb.hasRemaining()) { transferred += target.write(bb); return transferred; } } } return 0; }
@Override public long position() { int pos = byteBufferHeader.position(); List<ByteBuffer> messageBufferList = this.queryMessageResult.getMessageBufferList(); for (ByteBuffer bb : messageBufferList) { pos += bb.position(); } return pos; }
@Override public long transferTo(WritableByteChannel target, long position) throws IOException { if (this.byteBufferHeader.hasRemaining()) { transferred += target.write(this.byteBufferHeader); return transferred; } else { List<ByteBuffer> messageBufferList = this.queryMessageResult.getMessageBufferList(); for (ByteBuffer bb : messageBufferList) { if (bb.hasRemaining()) { transferred += target.write(bb); return transferred; } } } return 0; }