public long getLong(final long index) { return ((long) getByte(index) & 0xff) << 56 | ((long) getByte(index + 1) & 0xff) << 48 | ((long) getByte(index + 2) & 0xff) << 40 | ((long) getByte(index + 3) & 0xff) << 32 | ((long) getByte(index + 4) & 0xff) << 24 | ((long) getByte(index + 5) & 0xff) << 16 | ((long) getByte(index + 6) & 0xff) << 8 | ((long) getByte(index + 7) & 0xff) << 0; }
@Override public long getLong(final int index) { return ((long) getByte(index) & 0xff) << 56 | ((long) getByte(index + 1) & 0xff) << 48 | ((long) getByte(index + 2) & 0xff) << 40 | ((long) getByte(index + 3) & 0xff) << 32 | ((long) getByte(index + 4) & 0xff) << 24 | ((long) getByte(index + 5) & 0xff) << 16 | ((long) getByte(index + 6) & 0xff) << 8 | ((long) getByte(index + 7) & 0xff) << 0; }
@Override public void getBytes(int index, final byte[] dst) { // TODO: optimize this by using System.arraycopy for (int i = 0; i < dst.length; i++) { dst[i] = getByte(index++); } }
public void getBytes(long index, final byte[] dst) { // TODO: optimize this by using System.arraycopy for (int i = 0; i < dst.length; i++) { dst[i] = getByte(index++); } }
@Override public byte readByte() { return getByte(readerIndex++); }
@Override public short getUnsignedByte(final int index) { return (short) (getByte(index) & 0xFF); }
@Override public byte getByte(final int index) { return getByte((long) index); }
public long getLong(final long index) { return ((long) getByte(index) & 0xff) << 56 | ((long) getByte(index + 1) & 0xff) << 48 | ((long) getByte(index + 2) & 0xff) << 40 | ((long) getByte(index + 3) & 0xff) << 32 | ((long) getByte(index + 4) & 0xff) << 24 | ((long) getByte(index + 5) & 0xff) << 16 | ((long) getByte(index + 6) & 0xff) << 8 | ((long) getByte(index + 7) & 0xff) << 0; }
@Override public void getBytes(int index, final byte[] dst) { // TODO: optimize this by using System.arraycopy for (int i = 0; i < dst.length; i++) { dst[i] = getByte(index++); } }
public void getBytes(long index, final byte[] dst) { // TODO: optimize this by using System.arraycopy for (int i = 0; i < dst.length; i++) { dst[i] = getByte(index++); } }
@Override public void getBytes(int index, final byte[] dst) { // TODO: optimize this by using System.arraycopy for (int i = 0; i < dst.length; i++) { dst[i] = getByte(index++); } }
@Override public long getLong(final int index) { return ((long) getByte(index) & 0xff) << 56 | ((long) getByte(index + 1) & 0xff) << 48 | ((long) getByte(index + 2) & 0xff) << 40 | ((long) getByte(index + 3) & 0xff) << 32 | ((long) getByte(index + 4) & 0xff) << 24 | ((long) getByte(index + 5) & 0xff) << 16 | ((long) getByte(index + 6) & 0xff) << 8 | ((long) getByte(index + 7) & 0xff) << 0; }
public long getLong(final long index) { return ((long) getByte(index) & 0xff) << 56 | ((long) getByte(index + 1) & 0xff) << 48 | ((long) getByte(index + 2) & 0xff) << 40 | ((long) getByte(index + 3) & 0xff) << 32 | ((long) getByte(index + 4) & 0xff) << 24 | ((long) getByte(index + 5) & 0xff) << 16 | ((long) getByte(index + 6) & 0xff) << 8 | ((long) getByte(index + 7) & 0xff) << 0; }