CustomObjectInputStream in = new CustomObjectInputStream( inputStream, loader );
try {
return in.readObject();
}
catch ( ClassNotFoundException e ) {
throw new SerializationException( "could not deserialize", e );
}
catch ( IOException e ) {
throw new SerializationException( "could not deserialize", e );
}
finally {
try {
in.close();
}
catch (IOException ignore) {
// ignore
}
}
}
catch ( IOException e ) {
throw new SerializationException( "could not deserialize", e );
}
}