| |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.util.zip
类 ZipFile
java.lang.Object java.util.zip.ZipFile
- 直接已知子类:
- JarFile
public class ZipFile
- extends Object
此类用于从 ZIP 文件读取条目。
除非另有说明,将 null 参数传入此类中的构造方法或方法将导致抛出 NullPointerException
。
字段摘要 | |
---|---|
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 |
static int | OPEN_DELETE 打开 ZIP 文件并将其标记为删除的模式标志。 |
static int | OPEN_READ 打开 ZIP 文件进行阅读的模式标志。 |
构造方法摘要 | |
---|---|
ZipFile(File file) 打开供阅读的 ZIP 文件,由指定的 File 对象给出。 | |
ZipFile(File file, int mode) 打开新的 ZipFile 以使用指定模式从指定 File 对象读取。 | |
ZipFile(String name) 打开 ZIP 文件进行阅读。 |
方法摘要 | |
---|---|
void | close() 关闭 ZIP 文件。 |
Enumeration<? extends ZipEntry> | entries() 返回 ZIP 文件条目的枚举。 |
protected void | finalize() 确保不再引用此 ZIP 文件时调用它的 close 方法。 |
ZipEntry | getEntry(String name) 返回指定名称的 ZIP 文件条目;如果未找到,则返回 null。 |
InputStream | getInputStream(ZipEntry entry) 返回输入流以读取指定 ZIP 文件条目的内容。 |
String | getName() 返回 ZIP 文件的路径名。 |
int | size() 返回 ZIP 文件中的条目数。 |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
字段详细信息 |
---|
OPEN_READ
public static final int OPEN_READ
- 打开 ZIP 文件进行阅读的模式标志。
- 另请参见:
- 常量字段值
OPEN_DELETE
public static final int OPEN_DELETE
- 打开 ZIP 文件并将其标记为删除的模式标志。在打开文件和关闭文件之间的某个时间,该文件将被删除,但是其内容仍可通过 ZipFile 对象访问,直到调用关闭方法或虚拟机退出为止。
- 另请参见:
- 常量字段值
LOCSIG
public static final long LOCSIG
- 另请参见:
- 常量字段值
EXTSIG
public static final long EXTSIG
- 另请参见:
- 常量字段值
CENSIG
public static final long CENSIG
- 另请参见:
- 常量字段值
ENDSIG
public static final long ENDSIG
- 另请参见:
- 常量字段值
LOCHDR
public static final int LOCHDR
- 另请参见:
- 常量字段值