uk.ac.gla.terrier.compression
Class MemorySBOS
java.lang.Object
uk.ac.gla.terrier.compression.BitOutputStream
uk.ac.gla.terrier.compression.BitByteOutputStream
uk.ac.gla.terrier.compression.MemorySBOS
- All Implemented Interfaces:
- java.io.Closeable, BitOut
public class MemorySBOS
- extends BitByteOutputStream
This class extends the BitByteOutputStream, so it provides the compression writting functions, but
uses a MemoryOutputStream as an underlying OutputStream, so it is needed to be flushed to disk separately.
It uses BitByteOutputStream and not BitOutputStream because the MemoryOutputStream class has already its own buffer
(to keep everything in memory), and extra buffering is inadequate.
- Author:
- Roi Blanco
Constructor Summary |
MemorySBOS()
Constructor for the class. |
Methods inherited from class uk.ac.gla.terrier.compression.BitOutputStream |
append, append, flush, padAndFlush, writeBinary, writeDelta, writeGamma, writeGolomb, writeInterpolativeCode, writeMinimalBinary, writeSkewedGolomb |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MemorySBOS
public MemorySBOS()
throws java.io.IOException
- Constructor for the class. Instanciates the BitByteOutputStream and MemoryOutputStream classes.
- Throws:
java.io.IOException
- if an I/O error occurs.
toString
public java.lang.String toString()
- Writes the underlying MemoryOutputStream in String format.
- Overrides:
toString
in class java.lang.Object
getMOS
public MemoryOutputStream getMOS()
- Returns:
- The underlying MemoryOutputStream.
Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow