jp.hishidama.zip
クラス ZipOutputStream

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

public class ZipOutputStream
extends FilterOutputStream

Zipファイルを作成するクラス.

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

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

フィールドの概要
static int DEFLATED
           
static int STORED
           
 
コンストラクタの概要
ZipOutputStream(OutputStream out)
          コンストラクター.
ZipOutputStream(OutputStream out, String encoding)
          コンストラクター.
 
メソッドの概要
 void close()
           
 void closeEntry()
          エントリークローズ.
 void finish()
          出力終了.
 void flush()
           
 String getEncoding()
          エンコーディング取得.
 void putNextEntry(ZipEntry ze)
          エントリー設定.
 void setComment(String comment)
          コメント設定.
 void setEncoding(String encoding)
          エンコーディング設定.
 void setLevel(int level)
          圧縮レベル設定.
 void setMethod(int method)
          圧縮メソッド設定.
 void setPassword(byte[] password)
          パスワード設定.
 void write(byte[] b, int offset, int length)
           
 void write(int b)
           
 
クラス java.io.FilterOutputStream から継承されたメソッド
write
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

STORED

public static final int STORED
関連項目:
定数フィールド値

DEFLATED

public static final int DEFLATED
関連項目:
定数フィールド値
コンストラクタの詳細

ZipOutputStream

public ZipOutputStream(OutputStream out)
コンストラクター.

パラメータ:
out - 出力ストリーム

ZipOutputStream

public ZipOutputStream(OutputStream out,
                       String encoding)
コンストラクター.

パラメータ:
out - 出力ストリーム
メソッドの詳細

setEncoding

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

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

getEncoding

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

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

setPassword

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

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

finish

public void finish()
            throws IOException
出力終了.

例外:
IOException

closeEntry

public void closeEntry()
                throws IOException
エントリークローズ.

例外:
IOException

putNextEntry

public void putNextEntry(ZipEntry ze)
                  throws IOException
エントリー設定.

パラメータ:
ze - エントリー
例外:
IOException

setComment

public void setComment(String comment)
コメント設定.

パラメータ:
comment - コメント

setLevel

public void setLevel(int level)
圧縮レベル設定.

パラメータ:
level - 圧縮レベル

setMethod

public void setMethod(int method)
圧縮メソッド設定.

パラメータ:
method - 圧縮メソッド
関連項目:
DEFLATED, STORED

write

public void write(byte[] b,
                  int offset,
                  int length)
           throws IOException
オーバーライド:
クラス FilterOutputStream 内の write
例外:
IOException

write

public void write(int b)
           throws IOException
オーバーライド:
クラス FilterOutputStream 内の write
例外:
IOException

close

public void close()
           throws IOException
定義:
インタフェース Closeable 内の close
オーバーライド:
クラス FilterOutputStream 内の close
例外:
IOException

flush

public void flush()
           throws IOException
定義:
インタフェース Flushable 内の flush
オーバーライド:
クラス FilterOutputStream 内の flush
例外:
IOException