publicclass VerifySignedJar { privatestaticvoid Unreached (Object o) throws Exception
{ // Should never get here thrownew Exception ("Expected exception was not thrown");
}
publicstaticvoid main(String[] args) throws Exception {
File f = new File(System.getProperty("test.src", "."), "thawjar.jar");
JarFile jf = new JarFile(f); try { // Read entries via Enumeration for (Enumeration e = jf.entries(); e.hasMoreElements();)
jf.getInputStream((ZipEntry) e.nextElement());
// Read entry by name
ZipEntry ze = jf.getEntry("getprop.class");
JarEntry je = jf.getJarEntry("getprop.class");
// Make sure we throw NPE on null objects try { Unreached (jf.getEntry(null)); } catch (NullPointerException e) {}
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.