/* 60 */ handlerRegistry.add(contentHandler);
/* */ }
/* */
/* */ private static void registerContentHandler(Class contentHandler)
/* */ {
/* */ MailcapCommandMap mailcap;
/* */ DataContentHandler handler;
/* */ try {
/* 70 */ mailcap = (MailcapCommandMap)CommandMap.getDefaultCommandMap();
/* 71 */ handler = (DataContentHandler)contentHandler.newInstance();
/* */ }
/* */ catch (Exception e)
/* */ {
/* 75 */ throw new RuntimeException("Can not register content handler:" + e.getMessage());
/* */ }
/* */
/* 78 */ DataFlavor[] flavors = handler.getTransferDataFlavors();
/* 79 */ if (flavors == null) {
/* 80 */ return;
/* */ }
/* 82 */ for (int i = 0; i < flavors.length; i++)
/* */ {
/* 84 */ DataFlavor flavor = flavors[i];
/* 85 */ String entry = flavor.getMimeType() + ";;" + "x-java-content-handler" + "=" + contentHandler.getName();
/* 86 */ mailcap.addMailcap(entry);
/* */ }
/* */ }