public final void process(String uri, String baseUri) throws ParseException {
URL url;
try {
url = new URL(uri);
} catch (MalformedURLException e) {
throw new ParseException(e);
}
try {
URLConnection urlConnection = url.openConnection();
String mimeType = urlConnection.getContentType();
InputStream inputStream = urlConnection.getInputStream();
try {
process(inputStream, mimeType, baseUri);
} finally {
closeQuietly(inputStream);
}
} catch (IOException e) {
throw new ParseException(e);
}
}