handlerRegistry.add(contentHandler);
}
private static void registerContentHandler(Class contentHandler)
{
DataContentHandler handler;
MailcapCommandMap mailcap;
try
{
mailcap = (MailcapCommandMap) CommandMap.getDefaultCommandMap();
handler = (DataContentHandler) contentHandler.newInstance();
}
catch (Exception e)
{
throw new RuntimeException("Can not register content handler:" + e.getMessage());
}
DataFlavor[] flavors = handler.getTransferDataFlavors();
if (flavors == null)
return;
for (int i = 0; i < flavors.length; i++)
{