Q
Qu0ll
In the following code I have an array of bytes in "bytes" which is the
serialization of a class of type MyClass. When I try to deserialize the
bytes, it gets as far as the call to readObject() and then just stops. No
exception is thrown.
What could possibly cause the execution to stop at that point?
ByteArrayInputStream bais = new ByteArrayInputStream(bytes, 0,
bytes.length);
MyClass mc = null;
try {
ObjectInputStream ois = new ObjectInputStream(bais);
System.out.println("Reading object...");
Object o = ois.readObject();
System.out.println("Object read, o = " + o + ".");
mc = (MyClass)o;
}
catch (Exception cnfe) {
System.out.println("Exception!");
cnfe.printStackTrace();
}
--
And loving it,
-Q
_________________________________________________
(e-mail address removed)
(Replace the "SixFour" with numbers to email me)
serialization of a class of type MyClass. When I try to deserialize the
bytes, it gets as far as the call to readObject() and then just stops. No
exception is thrown.
What could possibly cause the execution to stop at that point?
ByteArrayInputStream bais = new ByteArrayInputStream(bytes, 0,
bytes.length);
MyClass mc = null;
try {
ObjectInputStream ois = new ObjectInputStream(bais);
System.out.println("Reading object...");
Object o = ois.readObject();
System.out.println("Object read, o = " + o + ".");
mc = (MyClass)o;
}
catch (Exception cnfe) {
System.out.println("Exception!");
cnfe.printStackTrace();
}
--
And loving it,
-Q
_________________________________________________
(e-mail address removed)
(Replace the "SixFour" with numbers to email me)