private String typeToPackageName(String contentType){
  contentType=contentType.toLowerCase();
  int len=contentType.length();
  char nm[]=new char[len];
  contentType.getChars(0,len,nm,0);
  for (int i=0; i < len; i++) {
    char c=nm[i];
    if (c == '/') {
      nm[i]='.';
    }
 else     if (!('A' <= c && c <= 'Z' || 'a' <= c && c <= 'z' || '0' <= c && c <= '9')) {
      nm[i]='_';
    }
  }
  return new String(nm);
}

private String typeToPackageName ( String contentType ) { contentType = contentType . toLowerCase ( ) ; int len = contentType . length ( ) ; char nm [ ] = new char [ len ] ; contentType . getChars ( 0 , len , nm , 0 ) ; for ( int i = 0 ; i < len ; i ++ ) { char c = nm [ i ] ; if ( c == '/' ) { nm [ i ] = '.' ; } else if ( ! ( 'A' <= c && c <= 'Z' || 'a' <= c && c <= 'z' || '0' <= c && c <= '9' ) ) { nm [ i ] = '_' ; } } return new String ( nm ) ; }
utility function to map a mime content type into an equivalent pair of class name components . for example : " text / html " would be returned as " text . html "
