java.util.zip - ZipInputStream 類



介紹

java.util.zip.ZipInputStream 類實現了一個輸入流過濾器,用於讀取 ZIP 檔案格式的檔案。支援壓縮和未壓縮的條目。

類宣告

以下是java.util.zip.ZipInputStream類的宣告:

public class ZipInputStream
   extends InflaterInputStream

欄位

以下是java.util.zip.ZipInputStream類的欄位:

  • static int CENATT

  • static int CENATX

  • static int CENCOM

  • static int CENCRC

  • static int CENDSK

  • static int CENEXT

  • static int CENFLG

  • static int CENHDR

  • static int CENHOW

  • static int CENLEN

  • static int CENNAM

  • static int CENOFF

  • static long CENSIG

  • static int CENSIZ

  • static int CENTIM

  • static int CENVEM

  • static int CENVER

  • static int ENDCOM

  • static int ENDHDR

  • static int ENDOFF

  • static long ENDSIG

  • static int ENDSIZ

  • static int ENDSUB

  • static int ENDTOT

  • static int EXTCRC

  • static int EXTHDR

  • static int EXTLEN

  • static long EXTSIG

  • static int EXTSIZ

  • static int LOCCRC

  • static int LOCEXT

  • static int LOCFLG

  • static int LOCHDR

  • static int LOCHOW

  • static int LOCLEN

  • static int LOCNAM

  • static long LOCSIG

  • static int LOCSIZ

  • static int LOCTIM

  • static int LOCVER

建構函式

序號 建構函式和描述
1

ZipInputStream(InputStream in)

建立一個新的 ZIP 輸入流。

2

ZipInputStream(InputStream in, Charset charset)

建立一個新的 ZIP 輸入流。

類方法

序號 方法和描述
1 int available()

在當前條目資料到達檔案結尾 (EOF) 後返回 0,否則始終返回 1。

2 void close()

關閉此輸入流並釋放與流關聯的任何系統資源。

3 void closeEntry()

關閉當前 ZIP 條目並將流定位到讀取下一個條目的位置。

4 ZipEntry getNextEntry()

讀取下一個 ZIP 檔案條目並將流定位到條目的開頭。

5 int read(byte[] b, int off, int len)

從當前 ZIP 條目讀取到位元組陣列中。

6 long skip(long n)

跳過當前 ZIP 條目中指定的位元組數。

繼承的方法

此類繼承自以下類的方法:

  • java.util.zip.InflaterInputStream
  • java.io.FilterInputStream
  • java.lang.Object
廣告
© . All rights reserved.