public class Bit
extends java.lang.Object
Constructor and Description |
---|
Bit() |
Modifier and Type | Method and Description |
---|---|
static int |
arrayReadBit(int index,
int offset,
byte[] buf)
Read a bit state in a byte array.
|
static void |
arrayWriteBit(int state,
int index,
int offset,
byte[] buf)
Write the bit state in a byte array.
|
public static void arrayWriteBit(int state, int index, int offset, byte[] buf)
state
- new state of the bit 1, 0index
- bit index into byte arrayoffset
- byte offset into byte array to startbuf
- byte array to manipulatepublic static int arrayReadBit(int index, int offset, byte[] buf)
index
- bit index into byte arrayoffset
- byte offset into byte array to startbuf
- byte array to read fromCopyright © 1999-2012 Maxim Integrated Products. All Rights Reserved.