public String getContentType() {
return "application/jboss-serialization";
}
public Serializable deserialize(Class<? extends Serializable> baseClass, InputStream in) throws IOException {
ObjectInputStream oo = new JBossObjectInputStream(in);
try {
return (Serializable)oo.readObject();
} catch (ClassNotFoundException e) {// 此异常是运行期不可恢复的错误,不应强制调用者捕获
throw new IOException("序列化类文件找不到:" + e.getMessage());
}
}