Last active
September 24, 2015 18:54
-
-
Save phax/7f3cfa55372a35b3d366 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.helger.as2lib.supplementary.main; | |
import javax.activation.CommandInfo; | |
import javax.activation.CommandMap; | |
import javax.activation.MailcapCommandMap; | |
import com.helger.commons.collection.CollectionHelper; | |
public final class MainListCommandMap | |
{ | |
public static void main (final String [] args) | |
{ | |
listCommandMap (); | |
} | |
public static void listCommandMap () | |
{ | |
final MailcapCommandMap aCommandMap = (MailcapCommandMap) CommandMap.getDefaultCommandMap (); | |
for (final String sMimeType : CollectionHelper.getSorted (aCommandMap.getMimeTypes ())) | |
{ | |
System.out.println (sMimeType); | |
for (final CommandInfo aCI : aCommandMap.getAllCommands (sMimeType)) | |
{ | |
System.out.println (" CommandInfo:"); | |
System.out.println (" " + aCI.getCommandClass ()); | |
System.out.println (" " + aCI.getCommandName ()); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment