Classes in this package fulfill needs that are not satisfied by the standard I/O classes available.
We provide replacement classes such as
FastBufferedReader and classes exposing the lines of
a file as an Iterable. The general
WordReader interface is used by MG4J
to provide customizable word segmentation.
The standard Java API lacks bit-level I/O classes: to this purpose, we
OutputBitStream, which can wrap any standard Java
corresponding stream and make it work at the bit level; moreover, they
provide support for several useful formats (such as unary, binary, minimal
binary, γ, δ and Golomb encoding).
Bit input and output streams offer also efficient buffering and a way to
reposition the bit stream in case the underlying byte stream is a
file-based stream or a
All coding methods work on natural numbers. The encoding of zero is very natural for some techniques, and much less natural for others. To keep methods rationally organized, all methods are able to encode any natural number. If, for instance, you want to write positive numbers in unary encoding and you do not want to waste a bit, you have to decrement them first (i.e., instead of p you must encode p − 1).
Interface Summary Interface Description OfflineIterable.Serializer<A,B extends A>Determines a strategy to serialize and deserialize elements. SafelyCloseableA marker interface for a closeable resource that implements safety measures to make resource tracking easier. WordReaderAn interface providing methods to break the input from a reader into words.
Class Summary Class Description ByteBufferInputStream ByteDiskQueueA queue of bytes partially stored on disk. DebugInputBitStreamA debugging wrapper for input bit streams. DebugOutputBitStreamA debugging wrapper for output bit streams. DelimitedWordReaderA word reader that breaks words on a given set of characters. FastBufferedReaderA lightweight, unsynchronised buffered reader based on mutable strings. FileLinesByteArrayIterableA wrapper exhibiting the lines of a file as an
Iterableof byte arrays.
FileLinesByteArrayIterable.FileLinesIteratorAn iterator over the lines of a
FileLinesCollection Deprecated. FileLinesCollection.FileLinesIterator Deprecated.Please use
FileLinesMutableStringIterable.iterator(java.io.InputStream, java.nio.charset.Charset, Class); the
zippedoption of this class can be simulated by passing a
FileLinesMutableStringIterable FileLinesMutableStringIterable.FileLinesIteratorAn iterator over the lines of a
InputBitStreamBit-level input stream. LineIteratorAn adapter that exposes a fast buffered reader as an iterator over the returned lines. LineWordReaderA trivial
WordReaderthat considers each line of a document a single word.
MultipleInputStreamA multiple input stream. NullInputStreamEnd-of-stream-only input stream. NullOutputStreamThrow-it-away output stream. NullReaderEnd-of-stream-only reader. OfflineIterable<T,U extends T>An iterable that offers elements that were previously stored offline using specialized serialization methods. OfflineIterable.OfflineIterator<A,B extends A>An iterator returned by an
OutputBitStreamBit-level output stream. SegmentedInputStream