throw new RuntimeException("Unexpected exception", ex);
}
if (file instanceof Directory) {
try {
file.prepare();
} catch (IOException ioe) {
String msg = "Error processing file: " + file.getFile().getAbsolutePath();
getLogger().log(Level.WARNING, msg, ioe);
throw new RestletException(msg, Status.SERVER_ERROR_INTERNAL);
}