|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.gla.terrier.compression.BitOutputStream uk.ac.gla.terrier.compression.OldBitOutputStream
public class OldBitOutputStream
This class creates sequentially a BitFile file from a stream.
BitFile
Constructor Summary | |
---|---|
OldBitOutputStream(java.io.File file)
Deprecated. Constructs an instance of the class for a given file |
|
OldBitOutputStream(java.io.OutputStream is)
Deprecated. Constructs an instance of the class for a given stream. |
|
OldBitOutputStream(java.lang.String filename)
Deprecated. Constructs an instance of the class for a given filename |
Method Summary | |
---|---|
void |
close()
Deprecated. Flushes and closes the stream. |
void |
flush()
Deprecated. Flush the underlying DataOutputStream to disk |
byte |
getBitOffset()
Deprecated. Returns the bit offset in the last byte. |
long |
getByteOffset()
Deprecated. Returns the byte offset of the stream. |
int |
writeBinary(int bitsToWrite,
int n)
Deprecated. Writes a binary integer to the already read buffer. |
int |
writeGamma(int n)
Deprecated. Writes an gamma encoded integer to the stream. |
int |
writeUnary(int n)
Deprecated. Writes a unary encoded integer to the stream. |
Methods inherited from class uk.ac.gla.terrier.compression.BitOutputStream |
---|
append, append, padAndFlush, writeDelta, writeGolomb, writeInt, writeInterpolativeCode, writeMinimalBinary, writeSkewedGolomb |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OldBitOutputStream(java.io.OutputStream is) throws java.io.IOException
is
- java.io.OutputStream the underlying input stream
java.io.IOException
- if an I/O error occurspublic OldBitOutputStream(java.lang.String filename) throws java.io.IOException
filename
- java.lang.String the name of the undelying file
java.io.IOException
- if an I/O error occurspublic OldBitOutputStream(java.io.File file) throws java.io.IOException
file
- java.io.File the underlying file
java.io.IOException
- if an I/O error occursMethod Detail |
---|
public int writeBinary(int bitsToWrite, int n) throws java.io.IOException
writeBinary
in interface BitOut
writeBinary
in class BitOutputStream
bitsToWrite
- the number of bits to use for encodingn
- the integer
java.io.IOException
- if an I/O error occurs.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class BitOutputStream
java.io.IOException
- if an I/O error occurspublic int writeUnary(int n) throws java.io.IOException
writeUnary
in interface BitOut
writeUnary
in class BitOutputStream
n
- int the integer to write.
java.io.IOException
- if an I/O error occurspublic int writeGamma(int n) throws java.io.IOException
writeGamma
in interface BitOut
writeGamma
in class BitOutputStream
n
- The integer to be encoded and saved in the buffer.
java.io.IOException
- if an I/O error occurspublic long getByteOffset()
getByteOffset
in interface BitOut
getByteOffset
in class BitOutputStream
public byte getBitOffset()
getBitOffset
in interface BitOut
getBitOffset
in class BitOutputStream
public void flush()
flush
in class BitOutputStream
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |