Class ZipTools
java.lang.Object
javajs.util.ZipTools
- All Implemented Interfaces:
GenericZipTools
Note the JSmol/HTML5 must use its own version of java.util.zip.ZipOutputStream.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddZipEntry(Object zos, String fileName) cacheZipContents(BufferedInputStream bis, String fileName, Map<String, Object> cache, boolean asByteArray) voidcloseZipEntry(Object zos) voidgetAllZipData(InputStream is, String[] subfileList, String name0, String binaryFileList, String exclude, Map<String, String> fileData) Deprecated.intgetCrcValue(byte[] bytes) static StringgetUnGzippedInputStream(byte[] bytes) String[]getZipDirectoryAndClose(BufferedInputStream bis, String manifestID) byte[]getZipFileContentsAsBytes(BufferedInputStream bis, String[] list, int listPtr) getZipFileDirectory(BufferedInputStream bis, String[] list, int listPtr, boolean asBufferedInputStream) iteratively drills into zip files of zip files to extract file content or zip file directory.getZipOutputStream(Object bos) booleanisZipStream(Object br) voidreadFileAsMap(BufferedInputStream bis, Map<String, Object> bdata, String name)
-
Constructor Details
-
ZipTools
public ZipTools()
-
-
Method Details
-
newZipInputStream
- Specified by:
newZipInputStreamin interfaceGenericZipTools
-
getAllZipData
@Deprecated public void getAllZipData(InputStream is, String[] subfileList, String name0, String binaryFileList, String exclude, Map<String, String> fileData) Deprecated.- Specified by:
getAllZipDatain interfaceGenericZipTools
-
getZipFileDirectory
public Object getZipFileDirectory(BufferedInputStream bis, String[] list, int listPtr, boolean asBufferedInputStream) iteratively drills into zip files of zip files to extract file content or zip file directory. Also works with JAR files. Does not return "__MACOS" paths- Specified by:
getZipFileDirectoryin interfaceGenericZipTools- Parameters:
bis-list-listPtr-asBufferedInputStream- for Pmesh- Returns:
- directory listing or subfile contents
-
getZipFileContentsAsBytes
- Specified by:
getZipFileContentsAsBytesin interfaceGenericZipTools
-
getZipDirectoryAsStringAndClose
- Specified by:
getZipDirectoryAsStringAndClosein interfaceGenericZipTools
-
getZipDirectoryAndClose
- Specified by:
getZipDirectoryAndClosein interfaceGenericZipTools
-
getStreamAsString
- Throws:
IOException
-
newGZIPInputStream
- Specified by:
newGZIPInputStreamin interfaceGenericZipTools- Throws:
IOException
-
newBZip2InputStream
- Specified by:
newBZip2InputStreamin interfaceGenericZipTools- Throws:
IOException
-
getUnGzippedInputStream
- Specified by:
getUnGzippedInputStreamin interfaceGenericZipTools
-
addZipEntry
- Specified by:
addZipEntryin interfaceGenericZipTools- Throws:
IOException
-
closeZipEntry
- Specified by:
closeZipEntryin interfaceGenericZipTools- Throws:
IOException
-
getZipOutputStream
- Specified by:
getZipOutputStreamin interfaceGenericZipTools
-
getCrcValue
public int getCrcValue(byte[] bytes) - Specified by:
getCrcValuein interfaceGenericZipTools
-
readFileAsMap
- Specified by:
readFileAsMapin interfaceGenericZipTools
-
cacheZipContents
public String cacheZipContents(BufferedInputStream bis, String fileName, Map<String, Object> cache, boolean asByteArray) - Specified by:
cacheZipContentsin interfaceGenericZipTools
-
isZipStream
- Specified by:
isZipStreamin interfaceGenericZipTools
-