public class ZipFS extends Object
| Constructor and Description |
|---|
ZipFS(File file) |
ZipFS(String fileName) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes ZipFS
|
void |
delete(String path)
Marks an element to be ignored.
|
ZipEntry |
getEntry(String path)
Returns the ZipEntry with the given path.
|
InputStream |
getInputStream(String path)
Returns the input stream of a path.
|
InputStream |
getInputStream(ZipEntry entry)
Returns the input stream of a path.
|
static String |
getName(String path)
Returns the substring after the last slash.
|
static String |
getName(ZipEntry zipEntry)
Returns the name of a ZIP entry.
|
static String |
getParentPath(String path)
Returns the parent path.
|
static String |
getParentPath(ZipEntry zipEntry)
Returns the parent path of an element.
|
List<ZipEntry> |
listFiles(String path)
Lists all elements in a path (files and folders)
|
void |
store(String path,
InputStream stream)
Stores a new element in the ZIP file with the given path.
|
public static final String SEPERATOR
public ZipFS(File file) throws IOException
IOExceptionpublic ZipFS(String fileName) throws IOException
IOExceptionpublic static String getName(ZipEntry zipEntry)
zipEntry - public static String getName(String path)
path - public static String getParentPath(ZipEntry zipEntry)
zipEntry - getParentPath(String path)public static String getParentPath(String path)
path - public List<ZipEntry> listFiles(String path)
path - public InputStream getInputStream(String path) throws IOException
path - IOExceptionpublic InputStream getInputStream(ZipEntry entry) throws IOException
entry - IOExceptionpublic ZipEntry getEntry(String path) throws IOException
path - IOExceptionpublic void delete(String path)
path - public void store(String path, InputStream stream) throws IOException
path - stream - IOExceptionpublic void close()
throws IOException
IOExceptionCopyright © 2007-2012 Global Information Systems Group, ETH Zurich. All Rights Reserved.