|
Terrier IR Platform 2.2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.gla.terrier.compression.BitInputStream
uk.ac.gla.terrier.compression.OldBitInputStream
public class OldBitInputStream
This class provides sequential stream access to a compressed BitFile file.
BitFile| Constructor Summary | |
|---|---|
OldBitInputStream(java.io.File file)
Constructs an instance of the class for a given file |
|
OldBitInputStream(java.io.InputStream is)
Constructs an instance of the class for a given stream. |
|
OldBitInputStream(java.lang.String filename)
Constructs an instance of the class for a given filename |
|
| Method Summary | |
|---|---|
void |
align()
Aligns the stream to the next byte |
void |
close()
Closes the stream. |
byte |
getBitOffset()
Returns the bit offset in the last byte. |
long |
getByteOffset()
Returns the byte offset of the stream. |
int |
readBinary(int noBits)
Reads a binary integer from the already read buffer. |
int |
readGamma()
Reads a gamma encoded integer from the stream |
int |
readUnary()
Reads a unary encoded integer from the stream. |
void |
skipBits(int noBits)
Skip a number of bits in the current input stream |
| Methods inherited from class uk.ac.gla.terrier.compression.BitInputStream |
|---|
readDelta, readGolomb, readInterpolativeCoding, readMinimalBinary, readMinimalBinaryZero, readSkewedGolomb |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OldBitInputStream(java.io.InputStream is)
throws java.io.IOException
is - java.io.InputStream the underlying input stream
java.io.IOException - if an I/O error occurs
public OldBitInputStream(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 occurs
public OldBitInputStream(java.io.File file)
throws java.io.IOException
file - java.io.File the underlying file
java.io.IOException - if an I/O error occurs| Method Detail |
|---|
public int readBinary(int noBits)
throws java.io.IOException
readBinary in interface BitInreadBinary in class BitInputStreamnoBits - the number of binary bits to read
java.io.IOException - if an I/O error occurs
public void skipBits(int noBits)
throws java.io.IOException
skipBits in interface BitInskipBits in class BitInputStreamnoBits - The number of bits to skip
java.io.IOException - if an I/O error occurs
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class BitInputStreamjava.io.IOException - if an I/O error occurs
public int readUnary()
throws java.io.IOException
readUnary in interface BitInreadUnary in class BitInputStreamjava.io.IOException - if an I/O error occurs
public int readGamma()
throws java.io.IOException
readGamma in interface BitInreadGamma in class BitInputStreamjava.io.IOException - if an I/O error occurspublic long getByteOffset()
getByteOffset in interface BitIngetByteOffset in class BitInputStreampublic byte getBitOffset()
getBitOffset in interface BitIngetBitOffset in class BitInputStream
public void align()
throws java.io.IOException
align in interface BitInalign in class BitInputStreamjava.io.IOException - if an I/O error occurs
|
Terrier IR Platform 2.2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||