@Override public int getInt(int index) { checkIndex(index, 4); return _getInt(index); }
@Override public long getLong(int index) { checkIndex(index, 8); return _getLong(index); }
@Override public ByteBuf setInt(int index, int value) { checkIndex(index, 4); _setInt(index, value); return this; }
@Override public ByteBuf setIntLE(int index, int value) { checkIndex(index, 4); _setIntLE(index, value); return this; }
protected final void checkSrcIndex(int index, int length, int srcIndex, int srcCapacity) { checkIndex(index, length); if (checkBounds) { checkRangeBounds(srcIndex, length, srcCapacity); } }
protected final void checkDstIndex(int index, int length, int dstIndex, int dstCapacity) { checkIndex(index, length); if (checkBounds) { checkRangeBounds(dstIndex, length, dstCapacity); } }
@Override public ByteBuf setShortLE(int index, int value) { checkIndex(index, 2); _setShortLE(index, value); return this; }
static void setBytes(AbstractByteBuf buf, long addr, int index, byte[] src, int srcIndex, int length) { buf.checkIndex(index, length); if (length != 0) { PlatformDependent.copyMemory(src, srcIndex, addr, length); } }
@Override public int getUnsignedMediumLE(int index) { checkIndex(index, 3); return _getUnsignedMediumLE(index); }
@Override public final long getLong(int index) { wrapped.checkIndex(index, 8); long v = _getLong(wrapped, index); return nativeByteOrder ? v : Long.reverseBytes(v); }
@Override public final int getInt(int index) { wrapped.checkIndex(index, 4); int v = _getInt(wrapped, index); return nativeByteOrder ? v : Integer.reverseBytes(v); }
@Override public byte getByte(int index) { checkIndex(index); return _getByte(index); }
@Override public short getShort(int index) { checkIndex(index, 2); return _getShort(index); }
@Override public int getIntLE(int index) { checkIndex(index, 4); return _getIntLE(index); }
@Override public ByteBuf setMedium(int index, int value) { checkIndex(index, 3); _setMedium(index, value); return this; }
@Override public ByteBuf setMediumLE(int index, int value) { checkIndex(index, 3); _setMediumLE(index, value); return this; }
@Override public ByteBuf setLong(int index, long value) { checkIndex(index, 8); _setLong(index, value); return this; }
@Override public int forEachByte(int index, int length, ByteProcessor processor) { checkIndex(index, length); try { return forEachByteAsc0(index, index + length, processor); } catch (Exception e) { PlatformDependent.throwException(e); return -1; } }
@Override public int forEachByteDesc(int index, int length, ByteProcessor processor) { checkIndex(index, length); try { return forEachByteDesc0(index + length - 1, index, processor); } catch (Exception e) { PlatformDependent.throwException(e); return -1; } }
static void getBytes(AbstractByteBuf buf, long addr, int index, byte[] dst, int dstIndex, int length) { buf.checkIndex(index, length); checkNotNull(dst, "dst"); if (isOutOfBounds(dstIndex, length, dst.length)) { throw new IndexOutOfBoundsException("dstIndex: " + dstIndex); } if (length != 0) { PlatformDependent.copyMemory(addr, dst, dstIndex, length); } }