targetType = Class.forName(className);
return codec.deserialize(bytes, targetType);
}
catch (ClassNotFoundException e) {
throw new SerializationException("unable to deserialize [" + targetType + "]. Class not found.", e);
}
catch (IOException e) {
throw new SerializationException("unable to deserialize [" + targetType + "]", e);
}
}