Merge branch 'feature/JAL-3063JAXB' into Jalview-BH/JAL-3026-JAL-3063-JAXB
[jalview.git] / srcjar / 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 InputStream newBZip2InputStream(InputStream bis) throws IOException;
19
20   public Object getZipFileDirectory(BufferedInputStream bis,
21                                           String[] subFileList, int listPtr, boolean asBufferedInputStream);
22
23   public String[] getZipDirectoryAndClose(BufferedInputStream t,
24                                                  String manifestID);
25
26   public void getAllZipData(InputStream bis, String[] subFileList,
27                                 String replace, String binaryFileList, String exclude,
28                                 Map<String, String> fileData);
29
30   public Object getZipFileContentsAsBytes(BufferedInputStream bis,
31                                                  String[] subFileList, int i);
32
33   public void addZipEntry(Object zos, String fileName) throws IOException;
34
35   public void closeZipEntry(Object zos) throws IOException;
36
37   public Object getZipOutputStream(Object bos);
38
39   public int getCrcValue(byte[] bytes);
40
41   public void readFileAsMap(BufferedInputStream is, Map<String, Object> bdata, String name);
42
43   public String cacheZipContents(BufferedInputStream bis, String shortName,
44                                  Map<String, Object> cache, boolean asByteArray);
45
46   BufferedInputStream getUnGzippedInputStream(byte[] bytes);
47 }