|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucar.nc2.iosp.bufr.BitReader
public class BitReader
Helper for reading data that has been bit packed.
Constructor Summary | |
---|---|
BitReader(RandomAccessFile raf,
long startPos)
Constructor |
Method Summary | |
---|---|
long |
bits2UInt(int nb)
Read the next nb bits and return an Unsigned Long . |
long |
getPos()
|
static void |
main(String[] args)
|
void |
setBitOffset(int bitOffset)
Position file at bitOffset from startPos |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BitReader(RandomAccessFile raf, long startPos) throws IOException
raf
- the RandomAccessFilestartPos
- points to start of data in data section, in bytes
IOException
- on read errorMethod Detail |
---|
public void setBitOffset(int bitOffset) throws IOException
bitOffset
- bit offset from starting position
IOException
- on io errorpublic long bits2UInt(int nb) throws IOException
nb
- the number of bits to convert to int, must be <= 64.
IOException
- on read errorpublic long getPos() throws IOException
IOException
public static void main(String[] args) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |