public byte getByte(long offset) { checkBounds(offset, offset + 1); return unsafe.getByte(peer + offset); }
public byte getByte(long offset) { checkBounds(offset, offset + 1); return unsafe.getByte(peer + offset); }
public void setByte(long offset, byte b) { checkBounds(offset, offset + 1); unsafe.putByte(peer + offset, b); }
public void setByte(long offset, byte b) { checkBounds(offset, offset + 1); unsafe.putByte(peer + offset, b); }
public byte getByte(long offset) { checkBounds(offset, offset + 1); return unsafe.getByte(peer + offset); }
public void put(long trgOffset, Memory memory, long srcOffset, long size) { checkBounds(trgOffset, trgOffset + size); memory.checkBounds(srcOffset, srcOffset + size); unsafe.copyMemory(memory.peer + srcOffset, peer + trgOffset, size); }
public void setByteBuffer(ByteBuffer buffer, long offset, int length) { checkBounds(offset, offset + length); MemoryUtil.setByteBuffer(buffer, peer + offset, length); }
public void setLong(long offset, long l) { checkBounds(offset, offset + 8); if (Architecture.IS_UNALIGNED) { unsafe.putLong(peer + offset, l); } else { putLongByByte(peer + offset, l); } }
public int getInt(long offset) { checkBounds(offset, offset + 4); if (Architecture.IS_UNALIGNED) { return unsafe.getInt(peer + offset); } else { return getIntByByte(peer + offset); } }
public void setMemory(long offset, long bytes, byte b) { checkBounds(offset, offset + bytes); // check if the last element will fit into the memory unsafe.setMemory(peer + offset, bytes, b); }
public void setInt(long offset, int l) { checkBounds(offset, offset + 4); if (Architecture.IS_UNALIGNED) { unsafe.putInt(peer + offset, l); } else { putIntByByte(peer + offset, l); } }
public void setShort(long offset, short l) { checkBounds(offset, offset + 2); if (Architecture.IS_UNALIGNED) { unsafe.putShort(peer + offset, l); } else { putShortByByte(peer + offset, l); } }
public void setInt(long offset, int l) { checkBounds(offset, offset + 4); if (Architecture.IS_UNALIGNED) { unsafe.putInt(peer + offset, l); } else { putIntByByte(peer + offset, l); } }
public int getInt(long offset) { checkBounds(offset, offset + 4); if (Architecture.IS_UNALIGNED) { return unsafe.getInt(peer + offset); } else { return getIntByByte(peer + offset); } }
public ByteBuffer asByteBuffer(long offset, int length) { checkBounds(offset, offset + length); return MemoryUtil.getByteBuffer(peer + offset, length); }
public void setByteBuffer(ByteBuffer buffer, long offset, int length) { checkBounds(offset, offset + length); MemoryUtil.setByteBuffer(buffer, peer + offset, length); }
public int getInt(long offset) { checkBounds(offset, offset + 4); if (unaligned) { return unsafe.getInt(peer + offset); } else { return getIntByByte(peer + offset); } }
public void setShort(long offset, short l) { checkBounds(offset, offset + 2); if (Architecture.IS_UNALIGNED) { unsafe.putShort(peer + offset, l); } else { putShortByByte(peer + offset, l); } }
public void setLong(long offset, long l) { checkBounds(offset, offset + 8); if (Architecture.IS_UNALIGNED) { unsafe.putLong(peer + offset, l); } else { putLongByByte(peer + offset, l); } }
@Inline protected void checkBounds(long start, long end) { assert peer != 0 || size == 0 : ref.printDebugInfo(); super.checkBounds(start, end); }