buffer.get(data);
ByteArrayInputStream bais = new ByteArrayInputStream(data);
// Use our version of ObjectInputStream so we can load old
// serialized object from an old store, i.e. store migration
ObjectInputStream ois = new MQObjectInputStream(bais);
try {
key = ois.readObject();
} catch (Throwable e) {
if (e instanceof ClassNotFoundException) {
throw (ClassNotFoundException)e;
} else {
kex = e;
}
}
try {
value = ois.readObject();
} catch (Throwable e) {
if (e instanceof ClassNotFoundException) {
throw (ClassNotFoundException)e;
} else {
vex = e;
}
}
// Mark client data starting position
if (maxClientDataSize > 0) {
// Since we've read in all data in the buffer, we need to
// reset the position back to client data starting position
int pos = limit - bais.available();
buffer.position(pos);
buffer.mark();
}
ois.close();
bais.close();
} catch (IOException e) {
ex = e;
}