Posted By:
Jonathan_Franklin
Posted On:
Sunday, March 7, 2004 11:14 AM
Does anyone know how you can convert a series of objects in an array to a byte stream to send to the client over RMI. // Serialize the film record into a byte array ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(bos); oos.writeObject(fo); oos.flush(); oos.close(); // Return the byte array return bos.toByteArray(); NOTE: the object "fo" is an array of objects and is what I want to turn into a byte array and send over RMI. Hope someone can help Thanks Jonathan
More>>
Does anyone know how you can convert a series of objects in an array to a byte stream to send to the client over RMI.
// Serialize the film record into a byte array
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(bos);
oos.writeObject(fo);
oos.flush();
oos.close();
// Return the byte array
return bos.toByteArray();
NOTE: the object "fo" is an array of objects and is what I want to turn into a byte array and send over RMI.
Hope someone can help
Thanks
Jonathan
<<Less