proxies.put(contentType, handler);
proxies.put(contentType, proxy);
	public ContentHandler createContentHandler(String contentType) {		//first, we check to see if there exists a built in content handler for		//this content type.  we can not overwrite built in ContentHandlers		String builtInHandlers = System.getProperty(CONTENT_HANDLER_PKGS);		builtInHandlers = builtInHandlers == null ? DEFAULT_VM_CONTENT_HANDLERS : DEFAULT_VM_CONTENT_HANDLERS + '|' + builtInHandlers;		Class clazz = null;		if (builtInHandlers != null) {			//replace '/' with a '.' and all characters not allowed in a java class name			//with a '_'.			// find all characters not allowed in java names			String convertedContentType = contentType.replace('.', '_');			convertedContentType = convertedContentType.replace('/', '.');			convertedContentType = convertedContentType.replace('-', '_');			StringTokenizer tok = new StringTokenizer(builtInHandlers, "|"); //$NON-NLS-1$			while (tok.hasMoreElements()) {				StringBuffer name = new StringBuffer();				name.append(tok.nextToken());				name.append("."); //$NON-NLS-1$				name.append(convertedContentType);				try {					clazz = Class.forName(name.toString());					if (clazz != null) {						return (null); //this class exists, it is a built in handler, let the JVM handle it						}				} catch (ClassNotFoundException ex) {				} //keep looking 			}		}		//first check to see if the handler is in the cache		ContentHandlerProxy proxy = (ContentHandlerProxy) proxies.get(contentType);		if (proxy != null) {			return (proxy);		}		org.osgi.framework.ServiceReference[] serviceReferences = contentHandlerTracker.getServiceReferences();		if (serviceReferences != null) {			for (int i = 0; i < serviceReferences.length; i++) {				Object obj = serviceReferences[i].getProperty(URLConstants.URL_CONTENT_MIMETYPE);				if (obj != null && obj instanceof String[]) {					String[] contentHandler = (String[]) obj;					for (int j = 0; j < contentHandler.length; j++) {						if (contentHandler[j].equals(contentType)) {							ContentHandler handler = (ContentHandler) context.getService(serviceReferences[i]);							proxy = new ContentHandlerProxy(contentType, serviceReferences[i], context);							proxies.put(contentType, handler);							return (proxy);						}					}				}			}		}		//If we can't find the content handler in the service registry, return Proxy with DefaultContentHandler set.		//We need to do this because if we return null, we won't get called again for this content type.		proxy = new ContentHandlerProxy(contentType, null, context);		proxies.put(contentType, proxy);		return (proxy);	}