public String findExtension(String mimeType){
  Object value=mimeMappings.get(mimeType);
  if (value instanceof String[]) {
    return ((String[])value)[0];
  }
 else   if (value instanceof String) {
    return (String)value;
  }
 else {
    return null;
  }
}

public String findExtension ( String mimeType ) { Object value = mimeMappings . get ( mimeType ) ; if ( value instanceof String [ ] ) { return ( ( String [ ] ) value ) [ 0 ] ; } else if ( value instanceof String ) { return ( String ) value ; } else { return null ; } }
find a file extension based on the specified mime type .
