public URLStreamHandler createURLStreamHandler(String protocol) {
String name = pkg + "." + protocol + ".Handler";
System.out.println("Loading handler class: " + name); // Loading this dummy class demonstrates the bootstrap // problem as the stream handler factory will be reentered // over and over again if the application class loader // shares the same stream handler factory. new Dummy(); try { Class<?> c = Class.forName(name); return (URLStreamHandler)c.getDeclaredConstructor().newInstance();
} catch (ClassNotFoundException |
IllegalAccessException |
InstantiationException |
NoSuchMethodException |
InvocationTargetException e) {
e.printStackTrace();
} returnnull;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.