|
Terrier IR Platform 1.1.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
public class BitInputStream
This class provides sequential stream access to a compressed BitFile file.
BitFile| Constructor Summary | |
|---|---|
BitInputStream(java.io.File file)
Constructs an instance of the class for a given file |
|
BitInputStream(java.io.InputStream is)
Constructs an instance of the class for a given stream. |
|
BitInputStream(java.lang.String filename)
Constructs an instance of the class for a given filename |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BitInputStream(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 BitInputStream(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 BitInputStream(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
noBits - the number of binary bits to read
java.io.IOException - if an I/O error occurs
public void close()
throws java.io.IOException
java.io.IOException - if an I/O error occurs
public int readUnary()
throws java.io.IOException
java.io.IOException - if an I/O error occurs
public int readGamma()
throws java.io.IOException
java.io.IOException - if an I/O error occurspublic long getByteOffset()
public byte getBitOffset()
|
Terrier IR Platform 1.1.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||