org.jmol.util
Class ZipUtil
java.lang.Object
org.jmol.util.ZipUtil
public class ZipUtil
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZipUtil
public ZipUtil()
isZipFile
public static boolean isZipFile(java.io.InputStream is)
throws java.lang.Exception
- Throws:
java.lang.Exception
isZipFile
public static boolean isZipFile(byte[] bytes)
throws java.lang.Exception
- Throws:
java.lang.Exception
getZipFileContents
public static java.lang.Object getZipFileContents(java.io.InputStream is,
java.lang.String[] list,
int listPtr,
boolean asInputStream)
- iteratively drills into zip files of zip files to extract file content
or zip file directory. Also works with JAR files.
- Parameters:
is
- list
- listPtr
- asInputStream
- for Pmesh
- Returns:
- directory listing or subfile contents
getZipFileContentsAsBytes
public static byte[] getZipFileContentsAsBytes(java.io.InputStream is,
java.lang.String[] list,
int listPtr)
getZipDirectoryAsStringAndClose
public static java.lang.String getZipDirectoryAsStringAndClose(java.io.InputStream is)
getZipDirectoryAndClose
public static java.lang.String[] getZipDirectoryAndClose(java.io.InputStream is,
boolean addManifest)
getZipDirectoryOrErrorAndClose
private static java.lang.String[] getZipDirectoryOrErrorAndClose(java.io.InputStream is,
boolean addManifest)
throws java.io.IOException
- Throws:
java.io.IOException
getZipEntryAsString
public static java.lang.String getZipEntryAsString(java.util.zip.ZipInputStream zis)
throws java.io.IOException
- Throws:
java.io.IOException
getZipEntryAsBytes
public static byte[] getZipEntryAsBytes(java.util.zip.ZipInputStream zis)
throws java.io.IOException
- Throws:
java.io.IOException
getStreamAsBytes
public static byte[] getStreamAsBytes(java.io.BufferedInputStream bis)
throws java.io.IOException
- Throws:
java.io.IOException