|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectframework.util.UByte
public class UByte
| Constructor Summary | |
|---|---|
UByte()
|
|
UByte(byte b)
|
|
UByte(char b)
|
|
UByte(int b)
|
|
UByte(long b)
|
|
UByte(short b)
|
|
UByte(java.lang.String sBin,
int nBytes)
|
|
| Method Summary | |
|---|---|
UByte |
addBit(char bit)
|
UByte |
addByte(long b)
|
UByte |
addByteAt(int pos,
long b)
Agrega un byte a la instancia para luego poder acceder a sus bits |
static int |
getByteAt(byte i,
int pos)
Retorna el byte en la posicion $pos contando desde cero de izquierda a derecha. byte => 1 bytes |
static int |
getByteAt(char i,
int pos)
Retorna el byte en la posicion $pos contando desde cero de izquierda a derecha. char => 2 bytes |
static int |
getByteAt(int i,
int pos)
Retorna el byte en la posicion $pos contando desde cero de izquierda a derecha. int => 4 bytes |
static int |
getByteAt(long i,
int pos)
Retorna el byte en la posicion $pos contando desde cero de izquierda a derecha. long => 8 bytes |
static int |
getByteAt(short i,
int pos)
Retorna el byte en la posicion $pos contando desde cero de izquierda a derecha. short => 2 bytes |
long |
getValue()
Retorna el valor decimal contenido en la instancia sin considerar el bit de signo, es decir: solo POSITIVOS |
long |
getValue(boolean signed)
Retorna el valor decimal contenido en la instancia considerando o no el bit de signo |
long |
getValueOf(int bitDesde,
int bitHasta)
Retorna un long con el valor decimal de los bits contenidos desde y hasta (no inclusive) en la instancia |
UByte |
insertBitAt(int pos,
char bit)
|
UByte |
setBitAt(int pos,
char bit)
Setea el $bit en la posicion $pos del binario. |
UByte |
setData(byte v)
Inicializa la instancia con los bits contenidos en los 1 bytes de $v |
UByte |
setData(char v)
Inicializa la instancia con los bits contenidos en los 2 bytes de $v |
UByte |
setData(int v)
Inicializa la instancia con los bits contenidos en los 4 bytes de $v |
UByte |
setData(long v)
Inicializa la instancia con los bits contenidos en los 8 bytes de $v |
UByte |
setData(short v)
Inicializa la instancia con los bits contenidos en los 2 bytes de $v |
java.lang.String |
toString()
|
java.lang.String |
trimLeftZeros()
Retorna el binario recortando los ceros a izquierda pero no recorta el valor de instancia, solo devuelve el valor recortado |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UByte()
public UByte(byte b)
public UByte(short b)
public UByte(char b)
public UByte(int b)
public UByte(long b)
public UByte(java.lang.String sBin,
int nBytes)
| Method Detail |
|---|
public UByte setBitAt(int pos,
char bit)
public UByte addBit(char bit)
public UByte insertBitAt(int pos,
char bit)
public java.lang.String trimLeftZeros()
public static int getByteAt(long i,
int pos)
public static int getByteAt(int i,
int pos)
public static int getByteAt(char i,
int pos)
public static int getByteAt(short i,
int pos)
public static int getByteAt(byte i,
int pos)
public UByte addByteAt(int pos,
long b)
public UByte addByte(long b)
public UByte setData(long v)
public UByte setData(int v)
public UByte setData(short v)
public UByte setData(char v)
public UByte setData(byte v)
public long getValueOf(int bitDesde,
int bitHasta)
public java.lang.String toString()
toString in class java.lang.Objectpublic long getValue()
public long getValue(boolean signed)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||