src/main/java/org/jboss/util/xml/catalog/readers/SAXCatalogReader.java
public void readCatalog(Catalog catalog, String fileUrl)
    throws MalformedURLException, IOException,
	   CatalogException {

    URL url = null;

    try {
      url = new URL(fileUrl);
    } catch (MalformedURLException e) {
      url = new URL("file:///" + fileUrl);
    }

    debug = catalog.getCatalogManager().debug;

    try {
      URLConnection urlCon = url.openConnection();
      readCatalog(catalog, urlCon.getInputStream());
    } catch (FileNotFoundException e) {
      catalog.getCatalogManager().debug.message(1, "Failed to load catalog, file not found",
		    url.toString());
    }
  }
public void readCatalog(Catalog catalog, String fileUrl)
    throws MalformedURLException, IOException,
	   CatalogException {

    URL url = null;

    try {
      url = new URL(fileUrl);
    } catch (MalformedURLException e) {
      url = new URL("file:///" + fileUrl);
    }

    debug = catalog.getCatalogManager().debug;

    try {
      URLConnection urlCon = url.openConnection();
      readCatalog(catalog, urlCon.getInputStream());
    } catch (FileNotFoundException e) {
      catalog.getCatalogManager().debug.message(1, "Failed to load catalog, file not found",
		    url.toString());
    }
  }
public void readCatalog ( Catalog catalog , String fileUrl ) throws MalformedURLException , IOException , CatalogException { URL url = null ; try { url = new URL ( fileUrl ) ; } catch ( MalformedURLException e ) { url = new URL ( "file:///" + fileUrl ) ; } debug = catalog . getCatalogManager ( ) . debug ; try { URLConnection urlCon = url . openConnection ( ) ; readCatalog ( catalog , urlCon . getInputStream ( ) ) ; } catch ( FileNotFoundException e ) { catalog . getCatalogManager ( ) . debug . message ( 1 , "Failed to load catalog, file not found" , url . toString ( ) ) ; } }
Parse an XML Catalog file.

@param catalog The catalog to which this catalog file belongs
@param fileUrl The URL or filename of the catalog file to process

@throws MalformedURLException Improper fileUrl
@throws IOException Error reading catalog file
Parse an XML Catalog file .