Method
unzipEntry
(ZipInputStream zin, File f)
Source from the content-addressed store, hash-verified
| 648 | |
| 649 | |
| 650 | static protected void unzipEntry(ZipInputStream zin, File f) throws IOException { |
| 651 | FileOutputStream out = new FileOutputStream(f); |
| 652 | byte[] b = new byte[512]; |
| 653 | int len = 0; |
| 654 | while ((len = zin.read(b)) != -1) { |
| 655 | out.write(b, 0, len); |
| 656 | } |
| 657 | out.flush(); |
| 658 | out.close(); |
| 659 | } |
| 660 | |
| 661 | |
| 662 | static public byte[] gzipEncode(byte[] what) throws IOException { |
Tested by
no test coverage detected