Java プラットフォーム 1.2

java.util.jar
クラス Manifest

java.lang.Object
  |
  +--java.util.jar.Manifest

public class Manifest
extends Object
implements Cloneable

Manifest クラスは、Manifest のエントリ名と、それに関連付けれられた Attributes を管理するために使います。エントリごとの Attributes の他に、メインとなる Manifest Attributes があります。

導入されたバージョン:
JDK1.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 getEntries()
          この Manifest に格納されているエントリの Map を返します。
 Attributes getMainAttributes()
          Manifest のメインとなる Attributes を返します。
 int hashCode()
          この Manifest のハッシュコードを返します。
 void read(InputStream is)
          指定された InputStream から Manifest を読み取ります。
 void write(OutputStream out)
          指定された OutputStream に Manifest を書き込みます。
 
クラス java.lang.Object から継承したメソッド
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

Manifest

public Manifest()
新しい空の Manifest を作成します。

Manifest

public Manifest(InputStream is)
         throws IOException
指定された入力ストリームから新しい Manifest を作成します。
パラメータ:
is - マニフェストデータを含む入力ストリーム

Manifest

public Manifest(Manifest man)
指定された Manifest のコピーである新しい Manifest を作成します。
パラメータ:
man - コピーする Manifest
メソッドの詳細

getMainAttributes

public Attributes getMainAttributes()
Manifest のメインとなる Attributes を返します。

getEntries

public Map getEntries()
この Manifest に格納されているエントリの Map を返します。各エントリは、String 名 (キー) と、関連付けられた Attributes (値) で表されます。

getAttributes

public Attributes getAttributes(String name)
指定されたエントリ名の Attributes を返します。このメソッドは、次のように定義されます。
	    return (Attributes)getEntries().get(name)
 

clear

public void clear()
この Manifest のメインとなる Attributes とエントリをクリアします。

write

public void write(OutputStream out)
           throws IOException
指定された OutputStream に Manifest を書き込みます。
パラメータ:
out - 出力ストリーム
例外:
IOException - 入出力エラーが発生した場合

read

public void read(InputStream is)
          throws IOException
指定された InputStream から Manifest を読み取ります。読み取られるエントリ名および属性は、現在のマニフェストエントリにマージされます。
パラメータ:
is - 入力ストリーム
例外:
IOException - 入出力エラーが発生した場合

equals

public boolean equals(Object o)
指定された Object が Manifest でもあり、そのメインとなる Attributes およびエントリが等しい場合に true を返します。
パラメータ:
o - 比較対象のオブジェクト
オーバーライド:
クラス Object 内の equals

hashCode

public int hashCode()
この Manifest のハッシュコードを返します。
オーバーライド:
クラス Object 内の hashCode

clone

public Object clone()
この Manifest のシャローコピーを返します。次のように実装されます。
     public Object clone() { return new Manifest(this); }
 
オーバーライド:
クラス Object 内の clone

Java プラットフォーム 1.2

バグや機能要求の報告
新しい javadoc の表示についてのコメントやご提案
Java は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.