question: public void add ( String mimeType , String [ ] extensions ) { if ( extensions == null ) { return ; } Object value = mimeMappings . get ( mimeType ) ; String [ ] a = null ; if ( value instanceof String [ ] ) { String [ ] old = ( String [ ] ) value ; a = new String [ old . length + extensions . length ] ; System . arraycopy ( old , 0 , a , 0 , old . length ) ; System . arraycopy ( extensions , 0 , a , a . length , extensions . length ) ; } else if ( value instanceof String ) { a = new String [ 1 + extensions . length ] ; a [ 0 ] = ( String ) value ; System . arraycopy ( extensions , 0 , a , 1 , extensions . length ) ; } else { a = new String [ extensions . length ] ; System . arraycopy ( extensions , 0 , a , 0 , extensions . length ) ; } mimeMappings . put ( mimeType , a ) ; }
target:  add file extensions. keep the existing file extensions.