JavaTM 2 Platform
Std. Ed. v1.3

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 形式に関するドキュメントは、以下を参照してください。

 http://java.sun.com/products/jdk/1.2/docs/guide/jar/manifest.html
 

導入されたバージョン:
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)
 
戻り値:
指定したエントリ名の Attributes

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

hashCode

public int hashCode()
この Manifest のハッシュコードを返します。
オーバーライド:
クラス Object 内の hashCode
クラス java.lang.Object からコピーされたタグ:
戻り値:
このオブジェクトのハッシュコード値
関連項目:
Object.equals(java.lang.Object), Hashtable

clone

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

JavaTM 2 Platform
Std. Ed. v1.3

バグや機能要求の報告
さらに詳しい API リファレンスおよび開発者ドキュメントについては、 Java 2 SDK SE Developer Documentation を参照してください。このドキュメントには、概念、用語の定義、回避策、 実用的なコード例など、開発者を対象にした詳細な解説が掲載されています。

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