//handling to be done
return con.getInputStream();
*/
Logger.getRootLogger().debug("Specified https uri is not supported by the system " +
uri);
throw new RpException("app.location.web.error",
new Object[] { uri });
} else {
/*
Logger.getRootLogger().info("Thread the location " +
uri + " as web (ftp://) ");
*/
return conn.getInputStream();
}
} catch (IOException e) {
Logger.getRootLogger().debug("I/OException getting the reader for uri:" +
uri);
throw new RpException("app.location.web.notavailable",
new Object[] { uri });
} catch (Throwable t) {
Logger.getRootLogger().debug("Error in getting the reader for the web location:" +
uri);
throw new RpException("app.location.web.error",
new Object[] { uri });
}
} else {
/*
Logger.getRootLogger().info("Thread the location " + uri +
" locally (file:///) ");
*/
try {
return new BufferedInputStream(u.openStream());
} catch (FileNotFoundException e) {
Logger.getRootLogger().debug("Specified file not exists:" +
uri);
throw new RpException("app.location.file.notavailable",
new Object[] { uri });
} catch (Throwable t) {
Logger.getRootLogger().debug("Error in getting the stream for the local location:" +
uri);
throw new RpException("app.location.file.error",
new Object[] { uri });
}
}
} catch (MalformedURLException e) {
Logger.getRootLogger().debug("Not a valid url location :" + uri);
throw new RpException("app.location.nourl", new Object[] { uri });
}
}