Reads and writes data from byte values.
Wrapper for java.io.RandomAccessFile.
See breeze.io.ByteConverter, reads big endian.
See breeze.io.ByteConverter, reads little endian.
Just a simple wrapper for OpenCSV's csvreader.
Just a simple wrapper for OpenCSV's csvreader.
Gets input and output streams to a file, wrapping them in GZIP streams if the file ends with .gz.
Wrapper for java.io.RandomAccessFile.
The main differences to java.io.RandomAccessFile are (1) naming (e.g. default naming is readInt64 instead of readLong) (2) the readXXX(n: Int) functions, which will try to read n samples from the file. (Try to use these functions instead of reading multiple times in a loop with readXXX(), as each individual read is costly in terms of performance. * Each function throws a java.io.IOException (including subclass java.io.EOFException). These can be caught in Scala if necessary, to detect ends of files when reading, for example. Catching is obligatory in Java.
*note: given that the JVM/Scala does not have a UInt64 type, nor a Int128 to promote to, UInt64s are dealt with in two ways... (1) as a spire.math.ULong (which represents UInt64 wrapped as a regular Long where the negative values represent their unsigned two's complement equivalent:
or (2) as a shifted Int64, where UInt64 is shifted down by 2^63 in its range to cover both positive and negative values of Int64 (this is compatible with + and -, for use as timestamps, for example, but is of course not compatible with * and / operations)
*implementation note: this class was not overriden from java.io.RandomAccessFile or implicitly "pimped," but instead passes through to java.io.RandomAccessFile. This is mainly because the java.io.RandomAccessFile.readXXX functions are declared final, and cannot be overridden.