src/main/java/org/jboss/util/xml/catalog/Catalog.java
public void addReader(String mimeType, CatalogReader reader) {
    if (readerMap.containsKey(mimeType)) {
      Integer pos = (Integer) readerMap.get(mimeType);
      readerArr.set(pos.intValue(), reader);
    } else {
      readerArr.add(reader);
      Integer pos = new Integer(readerArr.size()-1);
      readerMap.put(mimeType, pos);
    }
  }
public void addReader(String mimeType, CatalogReader reader) {
    if (readerMap.containsKey(mimeType)) {
      Integer pos = (Integer) readerMap.get(mimeType);
      readerArr.set(pos.intValue(), reader);
    } else {
      readerArr.add(reader);
      Integer pos = new Integer(readerArr.size()-1);
      readerMap.put(mimeType, pos);
    }
  }
Add a new CatalogReader to the Catalog.

<p>This method allows you to add a new CatalogReader to the
catalog. The reader will be associated with the specified mimeType.
You can only have one reader per mimeType.</p>

<p>In the absence of a mimeType (e.g., when reading a catalog
directly from a file on the local system), the readers are attempted
in the order that you add them to the Catalog.</p>

<p>Note that subordinate catalogs (created by CATALOG or
DELEGATE* entries) get a copy of the set of readers present in
the primary catalog when they are created. Readers added subsequently
will not be available. For this reason, it is best to add all
of the readers before the first call to parse a catalog.</p>

@param mimeType The MIME type associated with this reader.
@param reader The CatalogReader to use.