
08/05/2012, 01:08
|
 | | | Fecha de Ingreso: agosto-2008 Ubicación: En internet
Mensajes: 2.511
Antigüedad: 16 años, 5 meses Puntos: 188 | |
Respuesta: byte[] to Object[] Lo que necesitas es un serializador
public static byte[] serialize(Object obj) {
ByteArrayOutputStream out = new ByteArrayOutputStream(); ObjectOutputStream os = new ObjectOutputStream(out);
os.writeObject(obj);
return out.toByteArray();
}
// Tu metodo
public static Object deserialize(byte[] data) {
ByteArrayInputStream in = new ByteArrayInputStream(data); ObjectInputStream is = new ObjectInputStream(in);
return is.readObject();
}
Ahora tienes un Object, y lo que tienes q hacer es crear un Object[] y meterle el Object dentro.
__________________ if (fuzzy && smooth) {
fuzzylog = "c00l";
return true;
} |