Class MappedFrontCodedStringBigList

All Implemented Interfaces:
BigList<MutableString>, ObjectBigList<MutableString>, ObjectCollection<MutableString>, ObjectIterable<MutableString>, Size64, Stack<MutableString>, Closeable, AutoCloseable, Comparable<BigList<? extends MutableString>>, Iterable<MutableString>, Collection<MutableString>, RandomAccess

public class MappedFrontCodedStringBigList extends AbstractObjectBigList<MutableString> implements RandomAccess, Closeable
A memory-mapped version of FrontCodedStringBigList.

This class is functionally identical to FrontCodedStringBigList, but its data is memory-mapped from disk. Only UTF-8 encoding is supported.

To use this class, one first invokes the build(String, int, Iterator) method to generate a property file containing metadata, and two files containing strings and string pointers, respectively. Then, the load(String) method (invoked with the same basename) will return an instance of this class accessing strings and pointers by memory mapping.

Note that for consistency with other classes in this package this class implements a big list of mutable strings; however, for greater flexibility it also implements a getString(long) method and a getArray(long) method.

If you need to build an instance from a (possibly compressed) stream, we suggest to adapt it using FileLinesByteArrayIterable.iterator().

See Also: