in openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireObjectMessage.java [146:169]
public Serializable getObject() throws IOException {
if (object == null && getContent() != null) {
try {
Buffer content = getContent();
InputStream is = new DataByteArrayInputStream(content);
if (isCompressed()) {
is = new InflaterInputStream(is);
}
DataInputStream dataIn = new DataInputStream(is);
ObjectMessageInputStream objIn = new ObjectMessageInputStream(dataIn);
try {
object = (Serializable)objIn.readObject();
} catch (ClassNotFoundException ce) {
throw IOExceptionSupport.create("Failed to build body from content. Serializable class not available to broker. Reason: " + ce, ce);
} finally {
dataIn.close();
objIn.close();
}
} catch (Exception e) {
throw IOExceptionSupport.create("Failed to build body from bytes. Reason: " + e, e);
}
}
return this.object;
}