public final byte[] getZeroTerminatedByteArray(long offset, int maxlen) { checkBounds(offset, 1); return IO.getZeroTerminatedByteArray(address + offset, Math.min(maxlen, (int) (size - offset))); }
public void putZeroTerminatedByteArray(long offset, byte[] bytes, int off, int len) { // Ensure room for terminating zero byte checkBounds(offset, len + 1); IO.putZeroTerminatedByteArray(address + offset, bytes, off, len); }
public final void putAddress(long offset, long value) { checkBounds(offset, ADDRESS_SIZE >> 3); IO.putAddress(address + offset, value); } public final void putFloat(long offset, float value) {
public final byte[] getZeroTerminatedByteArray(long offset, int maxlen) { checkBounds(offset, 1); return IO.getZeroTerminatedByteArray(address + offset, Math.min(maxlen, (int) (size - offset))); }
public void putZeroTerminatedByteArray(long offset, byte[] bytes, int off, int len) { // Ensure room for terminating zero byte checkBounds(offset, len + 1); IO.putZeroTerminatedByteArray(address + offset, bytes, off, len); }
public final void putAddress(long offset, long value) { checkBounds(offset, ADDRESS_SIZE >> 3); IO.putAddress(address + offset, value); } public final void putFloat(long offset, float value) {
public final int getInt(long offset) { checkBounds(offset, 4); return IO.getInt(address + offset); }
public final float getFloat(long offset) { checkBounds(offset, 4); return IO.getFloat(address + offset); }
public final void put(long offset, float[] src, int off, int len) { checkBounds(offset, len << 2); IO.putFloatArray(address + offset, src, off, len); }
public final void putAddress(long offset, long value) { checkBounds(offset, ADDRESS_SIZE >> 3); IO.putAddress(address + offset, value); } public final void putFloat(long offset, float value) {
public BoundedNativeMemoryIO slice(long offset) { checkBounds(offset, 0); return offset == 0 ? this :new BoundedNativeMemoryIO(this, offset); }
public final short getShort(long offset) { checkBounds(offset, 2); return IO.getShort(address + offset); }
public final void putFloat(long offset, float value) { checkBounds(offset, 4); IO.putFloat(address + offset, value); }
public final void get(long offset, double[] dst, int off, int len) { checkBounds(offset, len << 3); IO.getDoubleArray(address + offset, dst, off, len); }
public final void put(long offset, double[] src, int off, int len) { checkBounds(offset, len << 3); IO.putDoubleArray(address + offset, src, off, len); }
public final byte[] getZeroTerminatedByteArray(long offset) { checkBounds(offset, 1); return IO.getZeroTerminatedByteArray(address + offset); }
public final void putLong(long offset, long value) { checkBounds(offset, 8); IO.putLong(address + offset, value); }
public final void get(long offset, short[] dst, int off, int len) { checkBounds(offset, len << 1); IO.getShortArray(address + offset, dst, off, len); }
public final void get(long offset, long[] dst, int off, int len) { checkBounds(offset, len << 3); IO.getLongArray(address + offset, dst, off, len); }
public final MemoryIO getMemoryIO(long offset) { checkBounds(offset, ADDRESS_SIZE >> 3); return NativeMemoryIO.wrap(runtime, IO.getAddress(address + offset)); }