src/main/java/org/jboss/util/xml/catalog/Catalog.java
public synchronized void parseCatalog(String mimeType, InputStream is)
    throws IOException, CatalogException {

    default_override = catalogManager.getPreferPublic();
    catalogManager.debug.message(4, "Parse " + mimeType + " catalog on input stream");

    CatalogReader reader = null;

    if (readerMap.containsKey(mimeType)) {
      int arrayPos = ((Integer) readerMap.get(mimeType)).intValue();
      reader = (CatalogReader) readerArr.get(arrayPos);
    }

    if (reader == null) {
      String msg = "No CatalogReader for MIME type: " + mimeType;
      catalogManager.debug.message(2, msg);
      throw new CatalogException(CatalogException.UNPARSEABLE, msg);
    }

    reader.readCatalog(this, is);

    // Now process all the pending catalogs...
    parsePendingCatalogs();
  }
public synchronized void parseCatalog(String mimeType, InputStream is)
    throws IOException, CatalogException {

    default_override = catalogManager.getPreferPublic();
    catalogManager.debug.message(4, "Parse " + mimeType + " catalog on input stream");

    CatalogReader reader = null;

    if (readerMap.containsKey(mimeType)) {
      int arrayPos = ((Integer) readerMap.get(mimeType)).intValue();
      reader = (CatalogReader) readerArr.get(arrayPos);
    }

    if (reader == null) {
      String msg = "No CatalogReader for MIME type: " + mimeType;
      catalogManager.debug.message(2, msg);
      throw new CatalogException(CatalogException.UNPARSEABLE, msg);
    }

    reader.readCatalog(this, is);

    // Now process all the pending catalogs...
    parsePendingCatalogs();
  }
public synchronized void parseCatalog ( String mimeType , InputStream is ) throws IOException , CatalogException { default_override = catalogManager . getPreferPublic ( ) ; catalogManager . debug . message ( 4 , "Parse " + mimeType + " catalog on input stream" ) ; CatalogReader reader = null ; if ( readerMap . containsKey ( mimeType ) ) { int arrayPos = ( ( Integer ) readerMap . get ( mimeType ) ) . intValue ( ) ; reader = ( CatalogReader ) readerArr . get ( arrayPos ) ; } if ( reader == null ) { String msg = "No CatalogReader for MIME type: " + mimeType ; catalogManager . debug . message ( 2 , msg ) ; throw new CatalogException ( CatalogException . UNPARSEABLE , msg ) ; } reader . readCatalog ( this , is ) ; // Now process all the pending catalogs... parsePendingCatalogs ( ) ; }
Parse a catalog file, augmenting internal data structures.

<p>Catalogs retrieved over the net may have an associated MIME type.
The MIME type can be used to select an appropriate reader.</p>

@param mimeType The MIME type of the catalog file.
@param is The InputStream from which the catalog should be read

@throws CatalogException Failed to load catalog
mimeType.
@throws IOException Error reading catalog file.
Parse a catalog file augmenting internal data structures .