protected void copyReaders ( Catalog newCatalog ) { // Have to copy the readers in the right order...convert hash to arr Vector mapArr = new Vector ( readerMap . size ( ) ) ; // Pad the mapArr out to the right length for ( int count = 0 ; count < readerMap . size ( ) ; count ++ ) { mapArr . add ( null ) ; } Enumeration enumt = readerMap . keys ( ) ; while ( enumt . hasMoreElements ( ) ) { String mimeType = ( String ) enumt . nextElement ( ) ; Integer pos = ( Integer ) readerMap . get ( mimeType ) ; mapArr . set ( pos . intValue ( ) , mimeType ) ; } for ( int count = 0 ; count < mapArr . size ( ) ; count ++ ) { String mimeType = ( String ) mapArr . get ( count ) ; Integer pos = ( Integer ) readerMap . get ( mimeType ) ; newCatalog . addReader ( mimeType , ( CatalogReader ) readerArr . get ( pos . intValue ( ) ) ) ; } }
Copies the reader list from the current Catalog to a new Catalog .