|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
java.util.zip.DeflaterInputStream
public class DeflaterInputStream
為使用 "deflate" 壓縮格式壓縮資料實作輸入串流過濾器。
DeflaterOutputStream,
InflaterOutputStream,
InflaterInputStream| 欄位摘要 | |
|---|---|
protected byte[] |
buf
讀取壓縮資料的輸入緩衝區。 |
protected Deflater |
def
此串流的壓縮器。 |
| 從類別 java.io.FilterInputStream 繼承的欄位 |
|---|
in |
| 建構子摘要 | |
|---|---|
DeflaterInputStream(InputStream in)
創建一個帶有預設壓縮器和緩衝區大小的新輸入串流。 |
|
DeflaterInputStream(InputStream in,
Deflater defl)
創建一個帶有指定壓縮器和預設緩衝區大小的新輸入串流。 |
|
DeflaterInputStream(InputStream in,
Deflater defl,
int bufLen)
創建一個帶有指定壓縮器和緩衝區大小的新輸入串流。 |
|
| 方法摘要 | |
|---|---|
int |
available()
在到達 EOF 後返回 0;否則始終返回 1。 |
void |
close()
關閉此輸入串流和它的底層輸入串流,丟棄掛起的未壓縮資料。 |
void |
mark(int limit)
不支持此操作。 |
boolean |
markSupported()
始終返回 false,因為此輸入串流不支持 mark() 和 reset() 方法。 |
int |
read()
從輸入串流讀取一個壓縮資料的單個位元組。 |
int |
read(byte[] b,
int off,
int len)
將壓縮資料讀入 byte 陣列。 |
void |
reset()
不支持此操作。 |
long |
skip(long n)
從輸入串流中跳過並丟棄資料。 |
| 從類別 java.io.FilterInputStream 繼承的方法 |
|---|
read |
| 從類別 java.lang.Object 繼承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 欄位詳細資訊 |
|---|
protected final Deflater def
protected final byte[] buf
| 建構子詳細資訊 |
|---|
public DeflaterInputStream(InputStream in)
in - 要讀入未壓縮資料的輸入串流
NullPointerException - 如果 in 為 null
public DeflaterInputStream(InputStream in,
Deflater defl)
in - 要讀入未壓縮資料的輸入串流defl - 此串流的壓縮器 ("deflater")
NullPointerException - 如果 in 或 defl 為 null
public DeflaterInputStream(InputStream in,
Deflater defl,
int bufLen)
in - 要讀入未壓縮資料的輸入串流defl - 此串流的壓縮器 ("deflater")bufLen - 壓縮緩衝區大小
IllegalArgumentException - 如果 bufLen <= 0
NullPointerException - 如果 in 或 defl 為 null| 方法詳細資訊 |
|---|
public void close()
throws IOException
Closeable 中的 closeFilterInputStream 中的 closeIOException - 如果發生 I/O 錯誤FilterInputStream.in
public int read()
throws IOException
FilterInputStream 中的 readIOException - 如果發生 I/O 錯誤或如果此串流已經關閉FilterInputStream.in
public int read(byte[] b,
int off,
int len)
throws IOException
FilterInputStream 中的 readb - 要讀入資料的緩衝區off - b 中資料的起始偏移量len - 要讀入 b 的最大壓縮位元組數
IndexOutOfBoundsException - 如果 len > b.length - off
IOException - 如果發生 I/O 錯誤或者此輸入串流已經關閉FilterInputStream.in
public long skip(long n)
throws IOException
n 作為 long 給出時,可以跳過的最大位元組數為 Integer.MAX_VALUE。
FilterInputStream 中的 skipn - 要跳過的位元組數
IOException - 如果發生 I/O 錯誤或者此串流已經關閉
public int available()
throws IOException
程序不應依靠此方法返回可以不受阻塞地讀取的實際位元組數。
FilterInputStream 中的 availableIOException - 如果發生 I/O 錯誤或者此串流已經關閉public boolean markSupported()
false,因為此輸入串流不支持 mark() 和 reset() 方法。
FilterInputStream 中的 markSupportedFilterInputStream.in,
InputStream.mark(int),
InputStream.reset()public void mark(int limit)
FilterInputStream 中的 marklimit - 在位置標記無效前可以讀取的最大位元組數FilterInputStream.in,
FilterInputStream.reset()
public void reset()
throws IOException
FilterInputStream 中的 resetIOException - 始終拋出FilterInputStream.in,
FilterInputStream.mark(int)
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。