jp.hishidama.zip
クラス ZipFile

java.lang.Object
  上位を拡張 jp.hishidama.zip.ZipFile
すべての実装されたインタフェース:
Closeable

public class ZipFile
extends Object
implements Closeable

Zipファイルを読み込むクラス.

Info-ZIPのzipcloakとApache AntのZipFileを参考に作ったクラスです。

導入されたバージョン:
2007.12.21
バージョン:
2008.01.19
作成者:
ひしだま

コンストラクタの概要
ZipFile(File f)
          コンストラクター.
ZipFile(File f, String encoding)
          コンストラクター.
ZipFile(String name)
          コンストラクター.
ZipFile(String name, String encoding)
          コンストラクター.
 
メソッドの概要
 void close()
          zipファイルクローズ.
 Enumeration<ZipEntry> entries()
          エントリー列挙.
 String getEncoding()
          エンコーディング取得.
 Enumeration<ZipEntry> getEntries()
          エントリー列挙.
 Iterator<ZipEntry> getEntriesIterator()
          エントリー一覧取得.
 ZipEntry getEntry(String name)
          エントリー取得.
 InputStream getInputStream(ZipEntry ze)
          入力ストリーム取得.
 void setEncoding(String encoding)
          エンコーディング設定.
 void setPassword(byte[] password)
          パスワード設定.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

ZipFile

public ZipFile(File f)
        throws IOException
コンストラクター.

パラメータ:
f - zipファイル名
例外:
IOException

ZipFile

public ZipFile(File f,
               String encoding)
        throws IOException
コンストラクター.

パラメータ:
f - zipファイル名
encoding - エンコーディング
例外:
IOException

ZipFile

public ZipFile(String name)
        throws IOException
コンストラクター.

パラメータ:
name - zipファイル名
例外:
IOException

ZipFile

public ZipFile(String name,
               String encoding)
        throws IOException
コンストラクター.

パラメータ:
name - zipファイル名
encoding - エンコーディング
例外:
IOException
メソッドの詳細

setPassword

public void setPassword(byte[] password)
パスワード設定.

パラメータ:
password - パスワード

close

public void close()
           throws IOException
zipファイルクローズ.

定義:
インタフェース Closeable 内の close
例外:
IOException

entries

public Enumeration<ZipEntry> entries()
エントリー列挙.

当メソッドはjava.util.zip.ZipFileとの互換性の為に用意されたものです。

戻り値:
エントリーの列挙
関連項目:
getEntriesIterator()

getEntries

public Enumeration<ZipEntry> getEntries()
エントリー列挙.

当メソッドはorg.apache.tools.zip.ZipFileとの互換性の為に用意されたものです。

戻り値:
エントリーの列挙
関連項目:
getEntriesIterator()

getEntriesIterator

public Iterator<ZipEntry> getEntriesIterator()
エントリー一覧取得.

戻り値:
ZipEntryのイテレーター

getEntry

public ZipEntry getEntry(String name)
エントリー取得.

パラメータ:
name - エントリー名
戻り値:
ZipEntry(存在しない場合、null)

getInputStream

public InputStream getInputStream(ZipEntry ze)
                           throws IOException,
                                  ZipException
入力ストリーム取得.

パラメータ:
ze - エントリー
戻り値:
入力ストリーム
例外:
IOException
ZipException

setEncoding

public void setEncoding(String encoding)
エンコーディング設定.

パラメータ:
encoding - エンコーディング

getEncoding

public String getEncoding()
エンコーディング取得.

戻り値:
エンコーディング