Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.
java.util.jar

Class Manifest

  • All Implemented Interfaces:
    Cloneable

    public class Manifest
    extends Object
    implements Cloneable
    The Manifest class is used to maintain Manifest entry names and their associated Attributes. There are main Manifest Attributes as well as per-entry Attributes. For information on the Manifest format, please see the Manifest format specification.
    Since:
    1.2
    See Also:
    Attributes
    • Constructor Detail

      • Manifest

        public Manifest()
        Constructs a new, empty Manifest.
      • Manifest

        public Manifest(InputStream is)
                 throws IOException
        Constructs a new Manifest from the specified input stream.
        Parameters:
        is - the input stream containing manifest data
        Throws:
        IOException - if an I/O error has occured
      • Manifest

        public Manifest(Manifest man)
        Constructs a new Manifest that is a copy of the specified Manifest.
        Parameters:
        man - the Manifest to copy
    • Method Detail

      • getMainAttributes

        public Attributes getMainAttributes()
        Returns the main Attributes for the Manifest.
        Returns:
        the main Attributes for the Manifest
      • getEntries

        public Map<String,Attributes> 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(java.io.InputStream), nor is such an entry written by using write(java.io.OutputStream).
        Returns:
        a Map of the entries contained in this Manifest
      • getAttributes

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

        Parameters:
        name - entry name
        Returns:
        the Attributes for the specified entry name
      • clear

        public void clear()
        Clears the main Attributes as well as the entries in this Manifest.
      • write

        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.
        Parameters:
        out - the output stream
        Throws:
        IOException - if an I/O error has occurred
        See Also:
        getMainAttributes()
      • read

        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.
        Parameters:
        is - the input stream
        Throws:
        IOException - if an I/O error has occurred
      • equals

        public boolean equals(Object o)
        Returns true if the specified Object is also a Manifest and has the same main Attributes and entries.
        Overrides:
        equals in class Object
        Parameters:
        o - the object to be compared
        Returns:
        true if the specified Object is also a Manifest and has the same main Attributes and entries
        See Also:
        Object.hashCode(), HashMap
      • clone

        public Object clone()
        Returns a shallow copy of this Manifest. The shallow copy is implemented as follows:
             public Object clone() { return new Manifest(this); }
         
        Overrides:
        clone in class Object
        Returns:
        a shallow copy of this Manifest
        See Also:
        Cloneable

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-java/util/jar/manifest.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut