|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.ObjectRedes.Buffer
Clase base para todos los tipos de paquetes de datos
| Field Summary | |
(package private) int[] |
Datos
Buffer que contiene todos los bytes del buffer. |
(package private) int |
longitud
Longitud en bytes del buffer |
| Constructor Summary | |
Buffer()
Crea un Buffer, contenedor de otros Buffers (solo usar en clases derivadas) |
|
Buffer(Buffer datos)
Constructor de copia |
|
Buffer(int tam)
Constructor |
|
Buffer(java.lang.String cadena)
Constructor |
|
| Method Summary | |
java.lang.String |
Contenido()
Devuelve una cadena de texto informativa sobre buffer |
int |
getBit(int numByte,
int numBit)
Devuelve un bit del byte que se indique |
int |
getByte(int numByte)
Recupera un byte del buffer |
int |
getByteH(int numByte)
Devuelve la parte alta del byte especificado |
int |
getByteL(int numByte)
Devuelve la parte baja del byte especificado |
protected char |
imprimible(int i)
Devuelve el equivalente imprimible del entero |
void |
Redimensiona(int tam)
Cambia el tamaņo del buffer de datos |
void |
setBit(int numByte,
int numBit,
int valor)
Pone un valor en el bit del byte especificado |
void |
setByte(int numByte,
int valor)
Pone un determinado valor en un byte del buffer |
void |
setByteH(int numByte,
int valor)
Pone un valor en la parte alta (bits 4567) del byte especificado |
void |
setByteL(int numByte,
int valor)
Pone un valor en la parte baja del byte especificado |
int |
Tam()
Devuelve el tamaņo del buffer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
int[] Datos
int longitud
| Constructor Detail |
public Buffer(int tam)
tam - Tamaņo inicial del buffer
java.lang.IllegalArgumentException - si el tamaņo indicado no es validopublic Buffer(java.lang.String cadena)
cadena - Datos del paquete
java.lang.IllegalArgumentException - si la cadena de texto no es validapublic Buffer(Buffer datos)
datos - Datos contenidos en el paquete
java.lang.IllegalArgumentException - si el buffer de datos no es validopublic Buffer()
| Method Detail |
public void Redimensiona(int tam)
tam - Nuevo tamaņo del buffer
java.lang.IllegalArgumentException - si el tamaņo no es validopublic int Tam()
public void setByte(int numByte,
int valor)
numByte - posicion del byte dentro del buffervalor - nuevo valor
java.lang.IllegalArgumentException - si los valores de los parametros no son validos
public void setByteH(int numByte,
int valor)
numByte - posicion del byte dentro del buffervalor - nuevo valor (4 bits)
java.lang.IllegalArgumentException - si alguno de los parametros tiene valor incorrecto
public void setByteL(int numByte,
int valor)
numByte - posicion del byte dentro del buffervalor - nuevo valor (4 bits)
java.lang.IllegalArgumentException - si alguno de los paramentro tiene valor incorrecto
public void setBit(int numByte,
int numBit,
int valor)
numByte - posicion del byte dentro del buffernumBit - bit del byte a modificarvalor - nuevo valor (4 bits)
java.lang.IllegalArgumentException - si los valores que se pasan no son validospublic int getByte(int numByte)
numByte - posicion del byte a recuperar
java.lang.IllegalArgumentException - si la posicion del byte indicado no es validapublic int getByteH(int numByte)
numByte - Posicion del byte
java.lang.IllegalArgumentException - si el byte indicado no existe
public int getBit(int numByte,
int numBit)
numByte - Posicion que ocupa el bytenumBit - posicion del Bit (01234567)
java.lang.IllegalArgumentException - si el byte especificado no existepublic int getByteL(int numByte)
numByte - Posicion del byte
java.lang.IllegalArgumentException - si el byte indicado no existepublic java.lang.String Contenido()
protected char imprimible(int i)
i - entero (valor de 0 a 255)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||