|
||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object jp.hishidama.zip.ZipFile
public class ZipFile
Zipファイルを読み込むクラス.
Info-ZIPのzipcloakとApache AntのZipFileを参考に作ったクラスです。
コンストラクタの概要 | |
---|---|
ZipFile(File f)
コンストラクター. |
|
ZipFile(File f,
String encoding)
コンストラクター. |
|
ZipFile(String name)
コンストラクター. |
|
ZipFile(String name,
String encoding)
コンストラクター. |
メソッドの概要 | |
---|---|
void |
close()
zipファイルクローズ. |
Enumeration<? extends ZipEntry> |
entries()
エントリー列挙. |
String |
getEncoding()
エンコーディング取得. |
Enumeration<ZipEntry> |
getEntries()
エントリー列挙. |
Iterator<ZipEntry> |
getEntriesIterator()
エントリー一覧取得. |
ZipEntry |
getEntry(String name)
エントリー取得. |
InputStream |
getInputStream(ZipEntry ze)
入力ストリーム取得. |
boolean |
isCheckCrc()
CRCチェック有無取得. |
void |
setCheckCrc(boolean b)
CRCチェック有無設定. |
void |
setEncoding(String encoding)
推奨されていません。 ZipFileでは当メソッドは無効です |
void |
setPassword(byte[] password)
パスワード設定. |
クラス java.lang.Object から継承されたメソッド |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
---|
public ZipFile(File f) throws IOException
f
- zipファイル名
IOException
public ZipFile(File f, String encoding) throws IOException
f
- zipファイル名encoding
- エンコーディング
IOException
public ZipFile(String name) throws IOException
name
- zipファイル名
IOException
public ZipFile(String name, String encoding) throws IOException
name
- zipファイル名encoding
- エンコーディング
IOException
メソッドの詳細 |
---|
@Deprecated public void setEncoding(String encoding)
encoding
- エンコーディングpublic void setPassword(byte[] password)
password
- パスワードpublic void setCheckCrc(boolean b)
データのCRCチェックを行うかどうかを設定します。
CRCチェックを行う場合、getInputStream(ZipEntry)
で取得したInputStreamのread()において、CRC不一致の場合にZipCrcException
が発生します。
b
- true:CRCチェックを行うpublic boolean isCheckCrc()
setCheckCrc(boolean)
public void close() throws IOException
Closeable
内の close
IOException
public Enumeration<? extends ZipEntry> entries()
当メソッドはjava.util.zip.ZipFile
との互換性の為に用意されたものです。
getEntriesIterator()
public Enumeration<ZipEntry> getEntries()
当メソッドはorg.apache.tools.zip.ZipFileとの互換性の為に用意されたものです。
getEntriesIterator()
public Iterator<ZipEntry> getEntriesIterator()
ZipEntry
のイテレーターpublic ZipEntry getEntry(String name)
name
- エントリー名
ZipEntry
(存在しない場合、null)public InputStream getInputStream(ZipEntry ze) throws IOException, ZipException
ze
- エントリー
IOException
ZipException
ZipPasswordException
setCheckCrc(boolean)
public String getEncoding()
|
||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |