Top Description Inners Fields Constructors Methods
com.sun.enterprise.module.single

public Class ManifestProxy

extends Manifest
Class Inheritance
Imports
java.io.IOException, .InputStream, .OutputStream, java.lang.reflect.InaccessibleObjectException, .InvocationTargetException, .Method, java.net.URL, java.util.Enumeration, .HashMap, .List, .Map, java.util.jar.Attributes, .JarFile, .Manifest, java.util.logging.Level, .Logger

Implements a manifest proxying
Author
Jerome Dochez

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public final Map<String, Attributes>
public final Attributes
public final Map<String, String>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Overrides java.util.jar.Manifest.clear.

Clears the main Attributes as well as the entries in this Manifest.

public Attributes
getAttributes(String name)

Overrides java.util.jar.Manifest.getAttributes.

Returns the Attributes for the specified entry name.

public Map<String, Attributes>
getEntries()

Overrides java.util.jar.Manifest.getEntries.

Returns a Map of the entries contained in this Manifest.

public Attributes
getMainAttributes()

Overrides java.util.jar.Manifest.getMainAttributes.

Returns the main Attributes for the Manifest.

private void
merge(Attributes target, Attributes source)

public void
read(InputStream is)

Overrides java.util.jar.Manifest.read.

Reads the Manifest from the specified InputStream.

public void
write(OutputStream out)

Overrides java.util.jar.Manifest.write.

Writes the Manifest to the specified OutputStream.

Inherited from java.util.jar.Manifest:
cloneequalshashCode

Field Detail

attributesback to summary
public final Map<String, Attributes> attributes
mainAttributesback to summary
public final Attributes mainAttributes
mappingsback to summary
public final Map<String, String> mappings

Constructor Detail

ManifestProxyback to summary
public ManifestProxy(ClassLoader cl, List<ManifestProxy.SeparatorMappings> mappings) throws IOException

Method Detail

clearback to summary
public void clear()

Overrides java.util.jar.Manifest.clear.

Doc from java.util.jar.Manifest.clear.

Clears the main Attributes as well as the entries in this Manifest.

Annotations
@Override
getAttributesback to summary
public Attributes getAttributes(String name)

Overrides java.util.jar.Manifest.getAttributes.

Doc from java.util.jar.Manifest.getAttributes.

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 getMainAttributes.

Annotations
@Override
getEntriesback to summary
public Map<String, Attributes> getEntries()

Overrides java.util.jar.Manifest.getEntries.

Doc from java.util.jar.Manifest.getEntries.

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 null key, but no entry with a null key is created by read, nor is such an entry written by using write.

Annotations
@Override
getMainAttributesback to summary
public Attributes getMainAttributes()

Overrides java.util.jar.Manifest.getMainAttributes.

Doc from java.util.jar.Manifest.getMainAttributes.

Returns the main Attributes for the Manifest.

Annotations
@Override
mergeback to summary
private void merge(Attributes target, Attributes source)
readback to summary
public void read(InputStream is) throws IOException

Overrides java.util.jar.Manifest.read.

Doc from java.util.jar.Manifest.read.

Reads the Manifest from the specified InputStream. The entry names and attributes read will be merged in with the current manifest entries.

Annotations
@Override
Exceptions
IOException:
if an I/O error has occurred
writeback to summary
public void write(OutputStream out) throws IOException

Overrides java.util.jar.Manifest.write.

Doc from java.util.jar.Manifest.write.

Writes the Manifest to the specified OutputStream. Attributes.Name.MANIFEST_VERSION must be set in MainAttributes prior to invoking this method.

Annotations
@Override
Exceptions
IOException:
if an I/O error has occurred
com.sun.enterprise.module.single back to summary

public final Class ManifestProxy.SeparatorMappings

extends Object
Class Inheritance
  • java.lang.Object
  • com.sun.enterprise.module.single.ManifestProxy.SeparatorMappings

Field Summary

Modifier and TypeField and Description
pack-priv final String
pack-priv final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

keyback to summary
pack-priv final String key
separatorback to summary
pack-priv final String separator

Constructor Detail

SeparatorMappingsback to summary
public SeparatorMappings(String key, String separator)