public HeapBuffer(int length, ByteOrder endianness) { memory = new HeapMemory(length, endianness); }
private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); dataMemory = new HeapMemory(data, ByteOrder.nativeOrder()); }
@Override public Memory slice(long startAddress, long sliceLength) { if (startAddress < 0) throw new IllegalArgumentException("startAddress must be >= 0"); if (sliceLength < 0) throw new IllegalArgumentException("sliceLength must be >= 0"); if (startAddress+sliceLength > length) throw new IllegalArgumentException("startAddress+sliceLength must be <= length"); return new HeapMemory(data, (int)(offset+startAddress), (int)sliceLength, endianness); }
public TableReader(@Nonnull final TableMeta<K, V> meta, @Nonnull final byte[] rawData) { this.meta = meta; dataMemory = new HeapMemory(rawData, ByteOrder.nativeOrder()); data = null; offsets = null; select = null; memory = null; minKey = meta.getMinKey(); maxKey = meta.getMaxKey(); }
private MphMap(final TableMeta<K, V> meta, final byte[] data, final byte[] offsets) { this.meta = meta; this.data = data; this.offsets = offsets; dataMemory = new HeapMemory(data, ByteOrder.nativeOrder()); minKey = meta.getMinKey(); maxKey = meta.getMaxKey(); if (offsets != null) { if (TableConfig.OffsetStorage.SELECTED.equals(meta.getConfig().getOffsetStorage())) { select = new HintedBsearchSelect(new Rank9(new ByteArrayBitVector(offsets))); memory = null; } else { select = null; memory = new HeapMemory(offsets, ByteOrder.nativeOrder()); } } else { select = null; memory = null; } }