|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
java.util.zip.DeflaterOutputStream
public class DeflaterOutputStream
此類別為使用 "deflate" 壓縮格式壓縮資料實作輸出串流過濾器。它還用作其他型別的壓縮過濾器(如 GZIPOutputStream)的基礎。
Deflater| 欄位摘要 | |
|---|---|
protected byte[] |
buf
寫入壓縮資料的輸出緩衝區。 |
protected Deflater |
def
此串流的壓縮器。 |
| 從類別 java.io.FilterOutputStream 繼承的欄位 |
|---|
out |
| 建構子摘要 | |
|---|---|
DeflaterOutputStream(OutputStream out)
使用預設壓縮器和緩衝區大小創建一個新輸出串流。 |
|
DeflaterOutputStream(OutputStream out,
Deflater def)
使用指定壓縮器和預設緩衝區大小創建一個新輸出串流。 |
|
DeflaterOutputStream(OutputStream out,
Deflater def,
int size)
使用指定壓縮器和緩衝區大小創建一個新輸出串流。 |
|
| 方法摘要 | |
|---|---|
void |
close()
將剩餘壓縮資料寫入輸出串流並關閉底層串流。 |
protected void |
deflate()
將下一個壓縮資料塊寫入輸出串流。 |
void |
finish()
完成將壓縮資料寫入輸出串流的操作,無需關閉底層串流。 |
void |
write(byte[] b,
int off,
int len)
將位元組陣列寫入壓縮的輸出串流。 |
void |
write(int b)
將位元組寫入壓縮的輸出串流。 |
| 從類別 java.io.FilterOutputStream 繼承的方法 |
|---|
flush, write |
| 從類別 java.lang.Object 繼承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 欄位詳細資訊 |
|---|
protected Deflater def
protected byte[] buf
| 建構子詳細資訊 |
|---|
public DeflaterOutputStream(OutputStream out,
Deflater def,
int size)
out - 輸出串流def - 壓縮器 ("deflater")size - 輸出緩衝區大小
IllegalArgumentException - 如果大小為 <= 0
public DeflaterOutputStream(OutputStream out,
Deflater def)
out - 輸出串流def - 壓縮器 ("deflater")public DeflaterOutputStream(OutputStream out)
out - 輸出串流| 方法詳細資訊 |
|---|
public void write(int b)
throws IOException
FilterOutputStream 中的 writeb - 要寫入的位元組
IOException - 如果發生 I/O 錯誤
public void write(byte[] b,
int off,
int len)
throws IOException
FilterOutputStream 中的 writeb - 要寫入的資料off - 資料的初始偏移量len - 資料的長度
IOException - 如果發生 I/O 錯誤FilterOutputStream.write(int)
public void finish()
throws IOException
IOException - 如果發生 I/O 錯誤
public void close()
throws IOException
Closeable 中的 closeFilterOutputStream 中的 closeIOException - 如果發生 I/O 錯誤FilterOutputStream.flush(),
FilterOutputStream.out
protected void deflate()
throws IOException
IOException - 如果發生 I/O 錯誤
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。