JavaTM 2
Platform
Std. Ed. v1.4.0

java.util.jar
クラス Manifest

java.lang.Object
  |
  +--java.util.jar.Manifest
すべての実装インタフェース:
Cloneable

public class Manifest
extends Object
implements Cloneable

Manifest クラスは、Manifest のエントリ名と、それに関連した Attributes を管理するために使います。エントリごとの Attributes の他に、メインとなる Manifest Attributes があります。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 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 - マニフェストデータを含む入力ストリーム
例外:
IOException - 入出力エラーが発生した場合

Manifest

public Manifest(Manifest man)
指定された Manifest のコピーである新しい Manifest を作成します。

パラメータ:
man - コピー対象の Manifest
メソッドの詳細

getMainAttributes

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

戻り値:
Manifest のメインとなる Attributes

getEntries

public Map 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
指定された OutputStream に Manifest を書き込みます。このメソッドを呼び出す前に、MainAttributes において Attributes.Name.MANIFEST_VERSION を設定する必要があります。

パラメータ:
out - 出力ストリーム
例外:
IOException - 入出力エラーが発生した場合
関連項目:
getMainAttributes()

read

public void read(InputStream is)
          throws IOException
指定された InputStream から Manifest を読み取ります。読み取られるエントリ名および属性は、現在のマニフェストエントリにマージされます。

パラメータ:
is - 入力ストリーム
例外:
IOException - 入出力エラーが発生した場合

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
Std. Ed. v1.4.0

バグの報告と機能のリクエスト
これ以外の API リファレンスおよび開発者用ドキュメントについては、 Java 2 SDK SE 開発者用ドキュメントを参照してください。 開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、 およびコード実例が含まれています。

Java、Java 2D、および JDBC は米国ならびにその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.