org.miv.jism.tools.BitString Class Reference

Describe a bits string. More...

List of all members.

Public Member Functions

 BitString (int initialSize)
 Create a new BitString with the given size.
boolean valueAt (int index)
 Bit value at the given index.
void add (boolean value)
 Add a bit.
void fill (boolean v)
 Fill with the given value.
void fill (boolean v, int offset, int size)
void setValue (int id, boolean v)
String toString ()
 BitString to string.
BitString concat (BitString b)
int size ()
 Taille du BitString.

Static Public Member Functions

static BitString convert (String s)
 Convertir un string sous la forme {0,1}+ en BitString.
static BitString convert (char c)
static BitString convert (int i)
static BitString convert (byte b)
static void main (String[] args)

Protected Attributes

ByteBuffer buffer
 Buffer storing data.

Static Protected Attributes

static final byte BIT_0 = (byte) Integer.parseInt( "10000000", 2 )
 Bit 0 mask.
static final byte BIT_1 = (byte) Integer.parseInt( "01000000", 2 )
 Bit 1 mask.
static final byte BIT_2 = (byte) Integer.parseInt( "00100000", 2 )
 Bit 2 mask.
static final byte BIT_3 = (byte) Integer.parseInt( "00010000", 2 )
 Bit 3 mask.
static final byte BIT_4 = (byte) Integer.parseInt( "00001000", 2 )
 Bit 4 mask.
static final byte BIT_5 = (byte) Integer.parseInt( "00000100", 2 )
 Bit 5 mask.
static final byte BIT_6 = (byte) Integer.parseInt( "00000010", 2 )
 Bit 6 mask.
static final byte BIT_7 = (byte) Integer.parseInt( "00000001", 2 )
 Bit 7 mask.
static final byte[] BITS = { BIT_0, BIT_1, BIT_2, BIT_3, BIT_4, BIT_5, BIT_6, BIT_7 }
 Set of all masks.


Detailed Description

Describe a bits string.

This object can be used to stock a big amount of boolean.

Author:
Guilhelm Savin

Member Function Documentation

boolean org.miv.jism.tools.BitString.valueAt ( int  index  ) 

Bit value at the given index.

Parameters:
index bit index

void org.miv.jism.tools.BitString.add ( boolean  value  ) 

Add a bit.

Parameters:
value bit value


Member Data Documentation

ByteBuffer org.miv.jism.tools.BitString.buffer [protected]

Buffer storing data.

See also:
java.nio.ByteBuffer


The documentation for this class was generated from the following file:
Generated on Fri Apr 18 10:49:00 2008 for JisM by  doxygen 1.5.3