net.sourceforge.jwap.util
Class BitArrayInputStream
java.lang.Object
|
+--net.sourceforge.jwap.util.BitArrayInputStream
- public class BitArrayInputStream
- extends java.lang.Object
Method Summary |
static java.util.BitSet |
getBitSet(byte m)
Constructs a BitSet of the byte m |
static java.lang.String |
getBitString(byte m)
Constructs a binary representation of the byte m |
static java.lang.String |
getBitString(byte[] m)
Constructs a binary representation of the byte-array m |
boolean |
getBoolean(byte b,
int bit)
returns if the given bit ist set in byte b
0 is the very left and 7 the very right bit in the byte |
byte |
getByte(byte b,
int offset,
int length)
returns a byte value of length bits
in byte b
beginning with bit offset
where 0 is the very left and 7 the very right bit in the byte |
int |
getInt(byte b1,
byte b2,
byte b3,
byte b4,
int offset,
int length)
|
int |
getLengthOfUIntVar(byte[] bytes,
int offset)
|
short |
getShort(byte b1,
byte b2,
int offset,
int length)
returns a short value of length bits
in byte b
beginning with bit offset
where 0 is the very left and 7 the very right bit in the byte |
int |
getUInt16(byte b1,
byte b2)
|
int |
getUInt16(byte b1,
byte b2,
int offset,
int length)
|
short |
getUInt8(byte b)
|
short |
getUInt8(byte b,
int offset,
int length)
|
long |
getUIntVar(byte[] bytes,
int offset)
|
static void |
main(java.lang.String[] args)
Test method |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BitArrayInputStream
public BitArrayInputStream()
getBoolean
public boolean getBoolean(byte b,
int bit)
- returns if the given bit ist set in byte
b
0 is the very left and 7 the very right bit in the byte
getByte
public byte getByte(byte b,
int offset,
int length)
- returns a byte value of
length
bits
in byte b
beginning with bit offset
where 0 is the very left and 7 the very right bit in the byte
getShort
public short getShort(byte b1,
byte b2,
int offset,
int length)
- returns a short value of
length
bits
in byte b
beginning with bit offset
where 0 is the very left and 7 the very right bit in the byte
getInt
public int getInt(byte b1,
byte b2,
byte b3,
byte b4,
int offset,
int length)
getUIntVar
public long getUIntVar(byte[] bytes,
int offset)
getUInt8
public short getUInt8(byte b,
int offset,
int length)
getUInt8
public short getUInt8(byte b)
getUInt16
public int getUInt16(byte b1,
byte b2,
int offset,
int length)
getUInt16
public int getUInt16(byte b1,
byte b2)
getLengthOfUIntVar
public int getLengthOfUIntVar(byte[] bytes,
int offset)
getBitString
public static java.lang.String getBitString(byte m)
- Constructs a binary representation of the byte
m
getBitString
public static java.lang.String getBitString(byte[] m)
- Constructs a binary representation of the byte-array
m
getBitSet
public static java.util.BitSet getBitSet(byte m)
- Constructs a BitSet of the byte
m
main
public static void main(java.lang.String[] args)
- Test method