throw new IOException("Cannot deserialize message. Unrecognized message preamble.");
}
ObjectInputStream input = new ContextObjectInputStream(inStream);
try {
return (Message) input.readObject();
} catch (ClassNotFoundException e) {
throw (IOException) (new IOException("Unable to deserialize message instance.").initCause(e));
} finally {
input.close();
}