java.applet

java.awt

java.awt.color

java.awt.datatransfer

java.awt.dnd

java.awt.event

java.awt.font

java.awt.geom

java.awt.im

java.awt.im.spi

java.awt.image

java.awt.image.renderable

java.awt.print

java.beans

java.beans.beancontext

java.io

java.lang

java.lang.annotation

java.lang.instrument

java.lang.management

java.lang.ref

java.lang.reflect

java.math

java.net

java.nio

java.nio.channels

java.nio.channels.spi

java.nio.charset

java.nio.charset.spi

java.rmi

java.rmi.activation

java.rmi.dgc

java.rmi.registry

java.rmi.server

java.security

java.security.acl

java.security.cert

java.security.interfaces

java.security.spec

java.sql

java.text

java.util

java.util.concurrent

java.util.concurrent.atomic

java.util.concurrent.locks

java.util.jar

java.util.logging

java.util.prefs

java.util.regex

java.util.zip

javax.accessibility

javax.activity

javax.crypto

javax.crypto.interfaces

javax.crypto.spec

javax.imageio

javax.imageio.event

javax.imageio.metadata

javax.imageio.plugins.bmp

javax.imageio.plugins.jpeg

javax.imageio.spi

javax.imageio.stream

javax.management

javax.management.loading

javax.management.modelmbean

javax.management.monitor

javax.management.openmbean

javax.management.relation

javax.management.remote

javax.management.remote.rmi

javax.management.timer

javax.naming

javax.naming.directory

javax.naming.event

javax.naming.ldap

javax.naming.spi

javax.net

javax.net.ssl

javax.print

javax.print.attribute

javax.print.attribute.standard

javax.print.event

javax.rmi

javax.rmi.CORBA

javax.rmi.ssl

javax.security.auth

javax.security.auth.callback

javax.security.auth.kerberos

javax.security.auth.login

javax.security.auth.spi

javax.security.auth.x500

javax.security.cert

javax.security.sasl

javax.sound.midi

javax.sound.midi.spi

javax.sound.sampled

javax.sound.sampled.spi

javax.sql

javax.sql.rowset

javax.sql.rowset.serial

javax.sql.rowset.spi

javax.swing

javax.swing.border

javax.swing.colorchooser

javax.swing.event

javax.swing.filechooser

javax.swing.plaf

javax.swing.plaf.basic

javax.swing.plaf.metal

javax.swing.plaf.multi

javax.swing.plaf.synth

javax.swing.table

javax.swing.text

javax.swing.text

javax.swing.text.parser

javax.swing.text.rtf

javax.swing.tree

javax.swing.undo

javax.transaction

javax.transaction.xa

javax.xml

javax.xml.datatype

javax.xml.namespace

javax.xml.parsers

javax.xml.transform

javax.xml.transform.dom

javax.xml.transform.sax

javax.xml.transform.stream

javax.xml.validation

javax.xml.xpath

org.ietf.jgss

org.omg.CORBA

org.omg.CORBA_2_3

org.omg.CORBA_2_3.portable

org.omg.CORBA.DynAnyPackage

org.omg.CORBA.ORBPackage

org.omg.CORBA.portable

org.omg.CORBA.TypeCodePackage

org.omg.CosNaming

org.omg.CosNaming.NamingContextExtPackage

org.omg.CosNaming.NamingContextPackage

org.omg.Dynamic

org.omg.DynamicAny

org.omg.DynamicAny.DynAnyFactoryPackage

org.omg.DynamicAny.DynAnyPackage

org.omg.IOP

org.omg.IOP.CodecFactoryPackage

org.omg.IOP.CodecPackage

org.omg.Messaging

org.omg.PortableInterceptor

org.omg.PortableInterceptor.ORBInitInfoPackage

org.omg.PortableServer

org.omg.PortableServer.CurrentPackage

org.omg.PortableServer.POAManagerPackage

org.omg.PortableServer.POAPackage

org.omg.PortableServer.portable

org.omg.PortableServer.ServantLocatorPackage

org.omg.SendingContext

org.omg.stub.java.rmi

org.w3c.dom

org.w3c.dom.bootstrap

org.w3c.dom.events

org.w3c.dom.ls

org.xml.sax

org.xml.sax.ext

org.xml.sax.helpers

allclasses-frame

allclasses-noframe

constant-values

deprecated-list

help-doc

JavaTM 2 Platform
Standard Ed. 5.0

java.util.jar
类 Manifest

java.lang.Object
  继承者 java.util.jar.Manifest
所有已实现的接口:
Cloneable

public class Manifest
extends Object
implements Cloneable

Manifest 类用于维护 Manifest 条目名称及其相关的 Attributes。既有主 Manifest 的 Attributes,也有每个条目的 Attributes。有关 Manifest 格式的信息,请参阅 Manifest 格式规范

从以下版本开始:
1.2
另请参见:
Attributes

构造方法摘要
Manifest()
          构造新的空 Manifest。
Manifest(InputStream is)
          从指定的输入流构造新的 Manifest。
Manifest(Manifest man)
          构造新的 Manifest,它是指定 Manifest 的副本。
 
方法摘要
 void clear()
          清除此 Manifest 中的主 Attributes 和条目。
 Object clone()
          返回 Manifest 的浅表复制。
 boolean equals(Object o)
          如果指定的 Object 也是一个 Manifest,并且具有相同的主 Attributes 和条目,则返回 true。
 Attributes getAttributes(String name)
          返回指定条目名称的 Attributes。
 Map<String,Attributes> getEntries()
          返回此 Manifest 中所包含条目的 Map。
 Attributes getMainAttributes()
          返回 Manifest 的主 Attributes。
 int hashCode()
          返回 Manifest 的哈希码。
 void read(InputStream is)
          从指定的 InputStream 读取 Manifest。
 void write(OutputStream out)
          将 Manifest 写入指定的 OutputStream。
 
从类 java.lang.Object 继承的方法
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

Manifest

public Manifest()
构造新的空 Manifest。


Manifest

public Manifest(InputStream is)
         throws IOException
从指定的输入流构造新的 Manifest。

参数:
is - 包含清单数据的输入流
抛出:
IOException - 如果发生 I/O 错误

Manifest

public Manifest(Manifest man)
构造新的 Manifest,它是指定 Manifest 的副本。

参数:
man - 要复制的 Manifest
方法详细信息

getMainAttributes

public Attributes getMainAttributes()
返回 Manifest 的主 Attributes。

返回:
Manifest 的主 Attributes

getEntries

public Map<String,Attributes> getEntries()
返回此 Manifest 中所包含条目的 Map。每个条目由一个 String 名称(键)和相关的 Attributes(值)表示。

返回:
此 Manifest 中所包含条目的 Map

getAttributes

public Attributes getAttributes(String name)
返回指定条目名称的 Attributes。此方法定义为:
            return (Attributes)getEntries().get(name)
 

参数:
name - 条目名称。
返回:
指定条目名称的 Attributes

clear

public void clear()
清除此 Manifest 中的主 Attributes 和条目。


write

public void write(OutputStream out)
           throws IOException
将 Manifest 写入指定的 OutputStream。在调用此方法前,必须在 MainAttributes 中设置 Attributes.Name.MANIFEST_VERSION。

参数:
out - 输出流。
抛出:
IOException - 如果发生 I/O 错误。
另请参见:
getMainAttributes()

read

public void read(InputStream is)
          throws IOException
从指定的 InputStream 读取 Manifest。读取的条目名称和属性将与当前的清单条目进行合并。

参数:
is - 输入流。
抛出:
IOException - 如果发生 I/O 错误

equals

public boolean equals(Object o)
如果指定的 Object 也是一个 Manifest,并且具有相同的主 Attributes 和条目,则返回 true。

覆盖:
Object 中的 equals
参数:
o - 要进行比较的对象
返回:
如果指定的 Object 也是一个 Manifest,并且具有相同的主 Attributes 和条目,则返回 true
另请参见:
Object.hashCode(), Hashtable

hashCode

public int hashCode()
返回 Manifest 的哈希码。

覆盖:
Object 中的 hashCode
返回:
此对象的一个哈希码值。
另请参见:
Object.equals(java.lang.Object), Hashtable

clone

public Object clone()
返回 Manifest 的浅表复制。浅表复制的实现方式如下:
     public Object clone() { return new Manifest(this); }
 

覆盖:
Object 中的 clone
返回:
Manifest 的浅表复制
另请参见:
Cloneable

JavaTM 2 Platform
Standard Ed. 5.0

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java 2 SDK SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。

版权所有 2004 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策