Foundation 1.1.2

java.util.zip
クラス GZIPInputStream

java.lang.Object
  上位を拡張 java.io.InputStream
      上位を拡張 java.io.FilterInputStream
          上位を拡張 java.util.zip.InflaterInputStream
              上位を拡張 java.util.zip.GZIPInputStream

public class GZIPInputStream
extends InflaterInputStream

このクラスは、GZIP 形式で圧縮されたデータを読み込むためのストリームフィルタを実装します。

関連項目:
InflaterInputStream

フィールドの概要
protected  CRC32 crc
          圧縮解除されたデータに使用する CRC-32 です。
protected  boolean eos
          入力ストリームの終端を表します。
static int GZIP_MAGIC
          GZIP のヘッダーマジック番号です。
 
クラス java.util.zip.InflaterInputStream から継承されたフィールド
buf, inf, len
 
クラス java.io.FilterInputStream から継承されたフィールド
in
 
コンストラクタの概要
GZIPInputStream(InputStream in)
          デフォルト値のバッファーサイズで新しい入力ストリームを作成します。
GZIPInputStream(InputStream in, int size)
          指定したバッファーサイズで新しい入力ストリームを作成します。
 
メソッドの概要
 void close()
          入力ストリームを閉じます。
 int read(byte[] buf, int off, int len)
          圧縮解除データをバイト配列に読み込みます。
 
クラス java.util.zip.InflaterInputStream から継承されたメソッド
available, fill, read, skip
 
クラス java.io.FilterInputStream から継承されたメソッド
mark, markSupported, read, reset
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

crc

protected CRC32 crc
圧縮解除されたデータに使用する CRC-32 です。


eos

protected boolean eos
入力ストリームの終端を表します。


GZIP_MAGIC

public static final int GZIP_MAGIC
GZIP のヘッダーマジック番号です。

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

GZIPInputStream

public GZIPInputStream(InputStream in,
                       int size)
                throws IOException
指定したバッファーサイズで新しい入力ストリームを作成します。

パラメータ:
in - 入力ストリーム
size - 入力バッファーサイズ
例外:
IOException - 入出力エラーが発生した場合
IllegalArgumentException - サイズが 0 以下の場合

GZIPInputStream

public GZIPInputStream(InputStream in)
                throws IOException
デフォルト値のバッファーサイズで新しい入力ストリームを作成します。

パラメータ:
in - 入力ストリーム
例外:
IOException - 入出力エラーが発生した場合
メソッドの詳細

read

public int read(byte[] buf,
                int off,
                int len)
         throws IOException
圧縮解除データをバイト配列に読み込みます。圧縮解除できるだけの入力が得られるまでブロックします。

オーバーライド:
クラス InflaterInputStream 内の read
パラメータ:
buf - データの読み込み先のバッファー
off - データの開始オフセット
len - 読み込まれる最大バイト数
戻り値:
読み込まれた実際のバイト数。圧縮された入力ストリームの最後に達した場合は -1
例外:
IOException - 入出力エラーが発生した場合、または圧縮入力データが壊れている場合
関連項目:
FilterInputStream.in

close

public void close()
           throws IOException
入力ストリームを閉じます。

オーバーライド:
クラス InflaterInputStream 内の close
例外:
IOException - 入出力エラーが発生した場合
関連項目:
FilterInputStream.in

Foundation 1.1.2

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

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。