|
Oracle Fusion Middleware Java API Reference for Oracle ADF Data Visualization Components 11g Release 1 (11.1.1.1.0) E12063-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.dss.util.xdo.template.flash.BitsReader
public class BitsReader
Read bits from a specified byte array Bit position is like this. 0000000 | | | +-- position(7) +-------- position(0) Example: BitsReader br = new BitsReader( data, 0, 0 ); int val = br.readBits( 5 ); // Read first 5 bits int val2 = br.readBits( 10 ); // Read next 10 bits ...
Field Summary | |
---|---|
protected int |
mBitPos
|
protected int |
mBytePos
|
protected byte[] |
mData
|
Constructor Summary | |
---|---|
BitsReader(byte[] data,
int bytePos,
int bitPos)
|
Method Summary | |
---|---|
int |
getBitPosition()
|
int |
getBytePosition()
|
static int |
readBits(byte data,
int startBit,
int endBit)
Read bits within a byte. |
int |
readBits(int numBits)
Read specified bits from the current position. |
static int |
readBits(int data,
int startBit,
int endBit)
Read bits within an int. |
void |
skipFilledBits()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected byte[] mData
protected int mBytePos
protected int mBitPos
Constructor Detail |
---|
public BitsReader(byte[] data, int bytePos, int bitPos)
Method Detail |
---|
public int readBits(int numBits)
numBits
- number of bits (must be <=32)
public static int readBits(byte data, int startBit, int endBit)
data
- start
- start bit position (0-7)end
- end bit position (0-7)
public static int readBits(int data, int startBit, int endBit)
data
- startBit
- endBit
-
public void skipFilledBits()
public int getBytePosition()
public int getBitPosition()
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Data Visualization Components 11g Release 1 (11.1.1.1.0) E12063-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |