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