Retrieving the Supported Mime Types of a Scripting Engine
import java.util.List; import javax.script.ScriptEngineFactory; import javax.script.ScriptEngineManager; public class MimeTypesDemo { public static void main(String[] args) { ScriptEngineManager manager = new ScriptEngineManager(); List<ScriptEngineFactory> factories = manager.getEngineFactories(); for (ScriptEngineFactory factory : factories) { List<String> mimeTypes = factory.getMimeTypes(); for (int i = 0; i < mimeTypes.size(); i++) { System.out.printf("Supported MIME type " + i + " " + (String) mimeTypes.get(i) + "\n"); } } } }