Unless otherwise noted, passing a null argument to a constructor
or method in this class will cause a NullPointerException to be
thrown.
Attributes
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Attributes | |
| private final Map | |
| private final JarVerifier |
| Access | Constructor and Description |
|---|---|
| public | |
| public | Manifest(InputStream
the input stream containing manifest data is)Constructs a new Manifest from the specified input stream. |
| pack-priv | Manifest(InputStream
the input stream containing manifest data is, String the name of the corresponding jar archive
if available, else null jarFilename)Constructs a new Manifest from the specified input stream. |
| pack-priv | Manifest(JarVerifier
the JarVerifier to use if any, else null jv, InputStream the input stream containing manifest data is, String the name of the corresponding jar archive if available jarFilename)Constructs a new Manifest from the specified input stream and associates it with a JarVerifier. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public Object | Returns: a shallow copy of this ManifestOverrides java. Returns a shallow copy of this Manifest. |
| public boolean | Returns: true if the specified Object is also a Manifest and has the same main Attributes and entriesthe object to be compared o)Overrides java. Returns true if the specified Object is also a Manifest and has the same main Attributes and entries. |
| public Attributes | Returns: the Attributes for the specified entry nameentry name name)Returns the Attributes for the specified entry name. |
| public Map | Returns: a Map of the entries contained in this ManifestReturns a Map of the entries contained in this Manifest. |
| pack-priv static String | |
| public Attributes | Returns: the main Attributes for the ManifestReturns the main Attributes for the Manifest. |
| pack-priv Attributes | Returns: returns the same result asgetAttributes(String)entry name name)Returns the Attributes for the specified entry name, if trusted. |
| public int | |
| private String | |
| pack-priv static void | |
| pack-priv static void | println72(OutputStream out, String line)
Writes |
| public void | |
| private void | |
| private int | |
| public void |
| attr | back to summary |
|---|---|
| private final Attributes attr | |
| entries | back to summary |
|---|---|
| private final Map<String, Attributes> entries | |
| jv | back to summary |
|---|---|
| private final JarVerifier jv | |
| Manifest | back to summary |
|---|---|
| public Manifest() Constructs a new, empty Manifest. | |
| Manifest | back to summary |
|---|---|
| public Manifest(InputStream is) throws IOException Constructs a new Manifest from the specified input stream.
| |
| Manifest | back to summary |
|---|---|
| pack-priv Manifest(InputStream is, String jarFilename) throws IOException Constructs a new Manifest from the specified input stream.
| |
| Manifest | back to summary |
|---|---|
| pack-priv Manifest(JarVerifier jv, InputStream is, String jarFilename) throws IOException Constructs a new Manifest from the specified input stream and associates it with a JarVerifier.
| |
| Manifest | back to summary |
|---|---|
| public Manifest(Manifest man) Constructs a new Manifest that is a copy of the specified Manifest.
| |
| clear | back to summary |
|---|---|
| public void clear() Clears the main Attributes as well as the entries in this Manifest. | |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Returns a shallow copy of this Manifest. The shallow copy is implemented as follows:
public Object clone() { return new Manifest(this); }
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Returns true if the specified Object is also a Manifest and has the same main Attributes and entries.
| |
| getAttributes | back to summary |
|---|---|
| public Attributes getAttributes(String name) Returns the Attributes for the specified entry name. This method is defined as:
return (Attributes)getEntries().get(name)
Though null is a valid name, when
getAttributes(null) is invoked on a Manifest
obtained from a jar file, null will be returned. While jar
files themselves do not allow null-named attributes, it is
possible to invoke getEntries on a Manifest, and
on that result, invoke put with a null key and an
arbitrary value. Subsequent invocations of
getAttributes(null) will return the just-put
value.
Note that this method does not return the manifest's main attributes;
see
| |
| getEntries | back to summary |
|---|---|
| public Map Returns a Map of the entries contained in this Manifest. Each entry
is represented by a String name (key) and associated Attributes (value).
The Map permits the
| |
| getErrorPosition | back to summary |
|---|---|
| pack-priv static String getErrorPosition(String filename, final int lineNumber) | |
| getMainAttributes | back to summary |
|---|---|
| public Attributes getMainAttributes() Returns the main Attributes for the Manifest.
| |
| getTrustedAttributes | back to summary |
|---|---|
| pack-priv Attributes getTrustedAttributes(String name) Returns the Attributes for the specified entry name, if trusted.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns the hash code for this Manifest. | |
| parseName | back to summary |
|---|---|
| private String parseName(byte[] lbuf, int len) | |
| println | back to summary |
|---|---|
| pack-priv static void println(OutputStream out) throws IOException Writes a line break to | |
| println72 | back to summary |
|---|---|
| pack-priv static void println72(OutputStream out, String line) throws IOException Writes | |
| read | back to summary |
|---|---|
| public void read(InputStream is) throws IOException Reads the Manifest from the specified InputStream. The entry names and attributes read will be merged in with the current manifest entries.
| |
| read | back to summary |
|---|---|
| private void read(InputStream is, String jarFilename) throws IOException | |
| toLower | back to summary |
|---|---|
| private int toLower(int c) | |
| write | back to summary |
|---|---|
| public void write(OutputStream out) throws IOException Writes the Manifest to the specified OutputStream. Attributes.Name.MANIFEST_VERSION must be set in MainAttributes prior to invoking this method.
| |
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | available()
Overrides java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream. |
| public void | close()
Overrides java. Implements java. Closes this input stream and releases any system resources associated with the stream. |
| private void | |
| public byte | |
| public int | |
| public int | read(byte[] b, int off, int len)
Overrides java. Reads up to |
| public int | |
| public int | |
| public long | skip(long n)
Overrides java. Skips over and discards |
| buf | back to summary |
|---|---|
| private byte[] buf | |
| count | back to summary |
|---|---|
| private int count | |
| pos | back to summary |
|---|---|
| private int pos | |
| FastInputStream | back to summary |
|---|---|
| pack-priv FastInputStream(InputStream in) | |
| FastInputStream | back to summary |
|---|---|
| pack-priv FastInputStream(InputStream in, int size) | |
| available | back to summary |
|---|---|
| public int available() throws IOException Overrides java. Doc from java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream. The next caller might be the same thread or another thread. A single read or skip of this many bytes will not block, but may read or skip fewer bytes.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this input stream and releases any system resources associated with the stream.
| |
| fill | back to summary |
|---|---|
| private void fill() throws IOException | |
| peek | back to summary |
|---|---|
| public byte peek() throws IOException | |
| read | back to summary |
|---|---|
| public int read() throws IOException Overrides java. Doc from java. Reads the next byte of data from the input stream. The value byte is
returned as an
| |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) throws IOException Overrides java. Doc from java. Reads up to
| |
| readLine | back to summary |
|---|---|
| public int readLine(byte[] b, int off, int len) throws IOException | |
| readLine | back to summary |
|---|---|
| public int readLine(byte[] b) throws IOException | |
| skip | back to summary |
|---|---|
| public long skip(long n) throws IOException Overrides java. Doc from java. Skips over and discards
| |