public Memory get(int index) { final int length = recordOffsets[index+1]-recordOffsets[index]; return block.slice(recordOffsets[index], length); }
public Memory get(int index) { final int length = recordOffsets[index+1]-recordOffsets[index]; return block.slice(recordOffsets[index], length); }
public CharArray(Memory buffer, long address, long length) { if (address < 0) throw new IndexOutOfBoundsException("address must be >= 0"); if (length < 0) throw new IllegalArgumentException("length must be >= 0"); if (address+length*TYPE_SIZE > buffer.length()) throw new IndexOutOfBoundsException(String.format("address+length*%d must be <= buffer.length()", TYPE_SIZE)); this.buffer = buffer.slice(address, length*TYPE_SIZE); this.length = length; }
public DoubleArray(Memory buffer, long address, long length) { if (address < 0) throw new IndexOutOfBoundsException("address must be >= 0"); if (length < 0) throw new IllegalArgumentException("length must be >= 0"); if (address+length*TYPE_SIZE > buffer.length()) throw new IndexOutOfBoundsException(String.format("address+length*%d must be <= buffer.length()", TYPE_SIZE)); this.buffer = buffer.slice(address, length*TYPE_SIZE); this.length = length; }
public IntArray(Memory buffer, long address, long length) { if (address < 0) throw new IndexOutOfBoundsException("address must be >= 0"); if (length < 0) throw new IllegalArgumentException("length must be >= 0"); if (address+length*TYPE_SIZE > buffer.length()) throw new IndexOutOfBoundsException(String.format("address+length*%d must be <= buffer.length()", TYPE_SIZE)); this.buffer = buffer.slice(address, length*TYPE_SIZE); this.length = length; }
public LongArray(Memory buffer, long address, long length) { if (address < 0) throw new IndexOutOfBoundsException("address must be >= 0"); if (length < 0) throw new IllegalArgumentException("length must be >= 0"); if (address+length*TYPE_SIZE > buffer.length()) throw new IndexOutOfBoundsException(String.format("address+length*%d must be <= buffer.length()", TYPE_SIZE)); this.buffer = buffer.slice(address, length*TYPE_SIZE); this.length = length; }
public FloatArray(Memory buffer, long address, long length) { if (address < 0) throw new IndexOutOfBoundsException("address must be >= 0"); if (length < 0) throw new IllegalArgumentException("length must be >= 0"); if (address+length*TYPE_SIZE > buffer.length()) throw new IndexOutOfBoundsException(String.format("address+length*%d must be <= buffer.length()", TYPE_SIZE)); this.buffer = buffer.slice(address, length*TYPE_SIZE); this.length = length; }
public ShortArray(Memory buffer, long address, long length) { if (address < 0) throw new IndexOutOfBoundsException("address must be >= 0"); if (length < 0) throw new IllegalArgumentException("length must be >= 0"); if (address+length*TYPE_SIZE > buffer.length()) throw new IndexOutOfBoundsException(String.format("address+length*%d must be <= buffer.length()", TYPE_SIZE)); this.buffer = buffer.slice(address, length*TYPE_SIZE); this.length = length; }
public ByteArray(Memory buffer, long address, long length) { if (address < 0) throw new IndexOutOfBoundsException("address must be >= 0"); if (length < 0) throw new IllegalArgumentException("length must be >= 0"); if (address+length > buffer.length()) throw new IndexOutOfBoundsException("address+length must be <= buffer.length()"); this.buffer = buffer.slice(address, length); this.length = length; }