| Constructor and Description |
|---|
ZipFile(File file)
Create a ZipFile from the specified file.
|
ZipFile(SeekableByteChannel channel)
Create a ZipFile from the specified channel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEntry(String name,
byte[] data,
boolean compressed) |
void |
close() |
InputStream |
getInputStream(String name) |
InputStream |
getInputStream(String name,
int limit) |
void |
removeEntry(String name) |
void |
renameEntry(String oldName,
String newName) |
public ZipFile(File file) throws IOException
file - the file to openIOException - if an I/O error occurspublic ZipFile(SeekableByteChannel channel) throws IOException
channel - the channel to read the file fromIOException - if an I/O error occurspublic void addEntry(String name, byte[] data, boolean compressed) throws IOException
IOExceptionpublic void close() throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic InputStream getInputStream(String name) throws IOException
IOExceptionpublic InputStream getInputStream(String name, int limit) throws IOException
IOExceptionpublic void removeEntry(String name) throws IOException
IOExceptionpublic void renameEntry(String oldName, String newName) throws IOException
IOExceptionCopyright © 2012–2025. All rights reserved.