|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
java.util.zip.InflaterInputStream
java.util.zip.GZIPInputStream
public class GZIPInputStream
此類別為讀取 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, mark, markSupported, read, reset, skip |
| 從類別 java.io.FilterInputStream 繼承的方法 |
|---|
read |
| 從類別 java.lang.Object 繼承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 欄位詳細資訊 |
|---|
protected CRC32 crc
protected boolean eos
public static final int GZIP_MAGIC
| 建構子詳細資訊 |
|---|
public GZIPInputStream(InputStream in,
int size)
throws IOException
in - 輸入串流size - 輸入緩衝區大小
IOException - 如果發生 I/O 錯誤
IllegalArgumentException - 如果大小為 <= 0
public GZIPInputStream(InputStream in)
throws IOException
in - 輸入串流
IOException - 如果發生 I/O 錯誤| 方法詳細資訊 |
|---|
public int read(byte[] buf,
int off,
int len)
throws IOException
len 不為零,則在可以解壓縮某些輸入之前,此方法將處於阻塞狀態;否則,不讀取位元組並且返回 0。
InflaterInputStream 中的 readbuf - 要讀入資料的緩衝區off - 目標陣列 b 中的初始偏移量len - 讀取位元組的最大數
NullPointerException - 如果 buf 為 null。
IndexOutOfBoundsException - 如果 off 為負,或者 len 為負或 len 大於 buf.length - off
IOException - 如果發生 I/O 錯誤或壓縮輸入資料損壞FilterInputStream.in
public void close()
throws IOException
Closeable 中的 closeInflaterInputStream 中的 closeIOException - 如果發生 I/O 錯誤FilterInputStream.in
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。