Class Details
Class JarEntry
public class
JarEntry
extends ZipEntry
This class represents a jar file entry, such as a class or jpeg file. The following code snippet shows how to get the entries in a jar file and query them.
JarFile jf = new JarFile("SomeJarFile.jar"); // Create a JarFile object from the file SomeJarFile.jar. Enumeration jarEnum = jf.entries(); while(jarEnum.hasMoreElements()) { JarEntry je = (JarEntry)enumJar.nextElement(); // Create a JarEntry from a jar entry in the jar file. Attributes jarAttr = je.getAttributes(); Set keys = jarAttr.keySet(); // Get keys of Attributes as a KeySet. Collection values = jarAttr.values(); // ...
Get PURE Java™ 2 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.