Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / src / javajs / api / GenericZipTools.java
1 package javajs.api;
2
3 import java.io.BufferedInputStream;
4 import java.io.IOException;
5 import java.io.InputStream;
6
7 import java.util.Map;
8
9
10 public interface GenericZipTools {
11
12   public ZInputStream newZipInputStream(InputStream is);
13   
14   public String getZipDirectoryAsStringAndClose(BufferedInputStream t);
15
16   public InputStream newGZIPInputStream(InputStream bis) throws IOException;
17
18   public Object getZipFileDirectory(BufferedInputStream bis,
19                                           String[] subFileList, int listPtr, boolean asBufferedInputStream);
20
21   public String[] getZipDirectoryAndClose(BufferedInputStream t,
22                                                  String manifestID);
23
24   public void getAllZipData(InputStream bis, String[] subFileList,
25                                 String replace, String string,
26                                 Map<String, String> fileData);
27
28   public Object getZipFileContentsAsBytes(BufferedInputStream bis,
29                                                  String[] subFileList, int i);
30
31   public void addZipEntry(Object zos, String fileName) throws IOException;
32
33   public void closeZipEntry(Object zos) throws IOException;
34
35   public Object getZipOutputStream(Object bos);
36
37   public int getCrcValue(byte[] bytes);
38
39   public void readFileAsMap(BufferedInputStream is, Map<String, Object> bdata, String name);
40
41   public String cacheZipContents(BufferedInputStream bis, String shortName,
42                                  Map<String, Object> cache, boolean asByteArray);
43
44   BufferedInputStream getUnGzippedInputStream(byte[] bytes);
45 }