X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src2%2Fjavajs%2Fapi%2FGenericZipTools.java;fp=src2%2Fjavajs%2Fapi%2FGenericZipTools.java;h=47a2da2eee37fdf718885d30bf8d7a1a50a7ac83;hb=665d2c2f4c1310e6985b93b7c2c8a8eec2fa9086;hp=0000000000000000000000000000000000000000;hpb=0e684f72690bd6532272a39ab6c188a27559fd09;p=jalview.git diff --git a/src2/javajs/api/GenericZipTools.java b/src2/javajs/api/GenericZipTools.java new file mode 100644 index 0000000..47a2da2 --- /dev/null +++ b/src2/javajs/api/GenericZipTools.java @@ -0,0 +1,47 @@ +package javajs.api; + +import java.io.BufferedInputStream; +import java.io.IOException; +import java.io.InputStream; + +import java.util.Map; + + +public interface GenericZipTools { + + public ZInputStream newZipInputStream(InputStream is); + + public String getZipDirectoryAsStringAndClose(BufferedInputStream t); + + public InputStream newGZIPInputStream(InputStream bis) throws IOException; + + public InputStream newBZip2InputStream(InputStream bis) throws IOException; + + public Object getZipFileDirectory(BufferedInputStream bis, + String[] subFileList, int listPtr, boolean asBufferedInputStream); + + public String[] getZipDirectoryAndClose(BufferedInputStream t, + String manifestID); + + public void getAllZipData(InputStream bis, String[] subFileList, + String replace, String binaryFileList, String exclude, + Map fileData); + + public Object getZipFileContentsAsBytes(BufferedInputStream bis, + String[] subFileList, int i); + + public void addZipEntry(Object zos, String fileName) throws IOException; + + public void closeZipEntry(Object zos) throws IOException; + + public Object getZipOutputStream(Object bos); + + public int getCrcValue(byte[] bytes); + + public void readFileAsMap(BufferedInputStream is, Map bdata, String name); + + public String cacheZipContents(BufferedInputStream bis, String shortName, + Map cache, boolean asByteArray); + + BufferedInputStream getUnGzippedInputStream(byte[] bytes); +}