Name
Manifest
Synopsis
This
class represents the manifest entry of a JAR file.
getMainAttributes( ) returns an
Attributes object that represents the manifest
attributes that apply to the entire JAR file. getAttributes(
) returns an Attributes object that
represents the manifest attributes specified for a single file in the
JAR file. getEntries( ) returns a
java.util.Map that maps the names of entries in
the JAR file to the Attributes objects associated
with those entries. getEntries( ) returns the
Map object used internally by the
Manifest. You can edit the contents of the
Manifest by adding, deleting, or editing entries
in the Map. read( ) reads
manifest entries from an input stream, merging them into the current
set of entries. write( ) writes the
Manifest out to the specified output stream.
Figure 16-113. java.util.jar.Manifest
public class Manifest implements Cloneable { // Public Constructors public Manifest( ); public Manifest(Manifest man); public Manifest(java.io.InputStream is) throws java.io.IOException; // Public Instance Methods public void clear( ); public java.util.jar.Attributes getAttributes(String name); public java.util.Map<String,java.util.jar.Attributes> getEntries( ); default:HashMap public java.util.jar.Attributes getMainAttributes( ); public void read(java.io.InputStream is) throws java.io.IOException; public void write(java.io.OutputStream out) throws java.io.IOException; ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access