|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.ximtec.igesture.util.ZipFS
public class ZipFS
Simplifies the access to ZIP files. Java does not allow the modification of ZIP files. Therefore, a temporary file is used to do write operations. After a close, the original file is replaced by the temporary one.
| Field Summary | |
|---|---|
static String |
SEPERATOR
|
| Constructor Summary | |
|---|---|
ZipFS(File file)
|
|
ZipFS(String fileName)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SEPERATOR
| Constructor Detail |
|---|
public ZipFS(File file)
throws IOException
IOException
public ZipFS(String fileName)
throws IOException
IOException| Method Detail |
|---|
public 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 -
IOException
public InputStream getInputStream(ZipEntry entry)
throws IOException
entry -
IOException
public ZipEntry getEntry(String path)
throws IOException
path -
IOExceptionpublic void delete(String path)
path -
public void store(String path,
InputStream stream)
throws IOException
path - stream -
IOException
public void close()
throws IOException
IOException
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||