public BoundedNativeMemoryIO slice(long offset) { checkBounds(offset, 0); return offset == 0 ? this :new BoundedNativeMemoryIO(this, offset); }
BoundedNativeMemoryIO(BoundedNativeMemoryIO parent, long offset) { super(true, parent.address() + offset); this.runtime = parent.runtime; this.size = parent.size - offset; this.parent = parent; }
public final byte[] getZeroTerminatedByteArray(long offset, int maxlen) { checkBounds(offset, 1); return IO.getZeroTerminatedByteArray(address + offset, Math.min(maxlen, (int) (size - offset))); }
public MemoryIO slice(long offset, long size) { return new BoundedNativeMemoryIO(runtime, this, offset, size); }
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 MemoryIO slice(long offset, long size) { return new BoundedNativeMemoryIO(runtime, this, offset, size); }
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, long size) { checkBounds(offset, size); return offset == 0 && size == this.size ? this :new BoundedNativeMemoryIO(runtime, this, offset, size); }
public MemoryIO slice(long offset, long size) { return new BoundedNativeMemoryIO(runtime, this, offset, size); }
BoundedNativeMemoryIO(BoundedNativeMemoryIO parent, long offset) { super(true, parent.address() + offset); this.runtime = parent.runtime; this.size = parent.size - offset; this.parent = parent; }
public final byte[] getZeroTerminatedByteArray(long offset, int maxlen) { checkBounds(offset, 1); return IO.getZeroTerminatedByteArray(address + offset, Math.min(maxlen, (int) (size - offset))); }
public BoundedNativeMemoryIO slice(long offset, long size) { checkBounds(offset, size); return offset == 0 && size == this.size ? this :new BoundedNativeMemoryIO(runtime, this, offset, size); }
public MemoryIO slice(long offset, long size) { return new BoundedNativeMemoryIO(runtime, this, offset, size); }