@Override public ByteBuf getBytes(int index, byte[] dst, int dstIndex, int length) { getBytes(index, dst, dstIndex, length, false); return this; }
@Override public ByteBuf getBytes(int index, ByteBuffer dst) { getBytes(index, dst, false); return this; }
@Override public ByteBuf getBytes(int index, OutputStream out, int length) throws IOException { getBytes(index, out, length, false); return this; }
@Override public int getBytes(int index, FileChannel out, long position, int length) throws IOException { return getBytes(index, out, position, length, false); }
@Override public int getBytes(int index, GatheringByteChannel out, int length) throws IOException { return getBytes(index, out, length, false); }
@Override public ByteBuf getBytes(int index, ByteBuffer dst) { getBytes(index, dst, false); return this; }
@Override public ByteBuf getBytes(int index, OutputStream out, int length) throws IOException { getBytes(index, out, length, false); return this; }
@Override public ByteBuf getBytes(int index, byte[] dst, int dstIndex, int length) { getBytes(index, dst, dstIndex, length, false); return this; }
@Override public int getBytes(int index, GatheringByteChannel out, int length) throws IOException { return getBytes(index, out, length, false); }
@Override public ByteBuf readBytes(OutputStream out, int length) throws IOException { checkReadableBytes(length); getBytes(readerIndex, out, length, true); readerIndex += length; return this; }
@Override public int readBytes(FileChannel out, long position, int length) throws IOException { checkReadableBytes(length); int readBytes = getBytes(readerIndex, out, position, length, true); readerIndex += readBytes; return readBytes; }
@Override public ByteBuf readBytes(byte[] dst, int dstIndex, int length) { checkReadableBytes(length); getBytes(readerIndex, dst, dstIndex, length, true); readerIndex += length; return this; }
@Override public ByteBuf readBytes(ByteBuffer dst) { int length = dst.remaining(); checkReadableBytes(length); getBytes(readerIndex, dst, true); readerIndex += length; return this; }
@Override public int readBytes(GatheringByteChannel out, int length) throws IOException { checkReadableBytes(length); int readBytes = getBytes(readerIndex, out, length, true); readerIndex += readBytes; return readBytes; }
@Override public ByteBuf readBytes(byte[] dst, int dstIndex, int length) { checkReadableBytes(length); getBytes(readerIndex, dst, dstIndex, length, true); readerIndex += length; return this; }
@Override public ByteBuf readBytes(ByteBuffer dst) { int length = dst.remaining(); checkReadableBytes(length); getBytes(readerIndex, dst, true); readerIndex += length; return this; }
@Override public int readBytes(GatheringByteChannel out, int length) throws IOException { checkReadableBytes(length); int readBytes = getBytes(readerIndex, out, length, true); readerIndex += readBytes; return readBytes; }
@Override public ByteBuf readBytes(OutputStream out, int length) throws IOException { checkReadableBytes(length); getBytes(readerIndex, out, length, true); readerIndex += length; return this; }
@Override public int readBytes(FileChannel out, long position, int length) throws IOException { checkReadableBytes(length); int readBytes = getBytes(readerIndex, out, position, length, true); readerIndex += readBytes; return readBytes; }
@Override public ByteBuf getBytes(int index, ByteBuf dst, int dstIndex, int length) { checkDstIndex(index, length, dstIndex, dst.capacity()); if (dst.hasArray()) { getBytes(index, dst.array(), dst.arrayOffset() + dstIndex, length); } else if (dst.nioBufferCount() > 0) { for (ByteBuffer bb: dst.nioBuffers(dstIndex, length)) { int bbLen = bb.remaining(); getBytes(index, bb); index += bbLen; } } else { dst.setBytes(dstIndex, this, index, length); } return this; }