Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static void cacheZippingFromExistFile() throws IOException {
- final String zipCacheFileName = CACHE_FILE_NAME + ".zip";
- try (ZipOutputStream zout = new ZipOutputStream(new FileOutputStream(zipCacheFileName));
- FileInputStream fis = new FileInputStream(CACHE_FILE_NAME)) {
- final ZipEntry entry = new ZipEntry("H8Cache");
- zout.putNextEntry(entry);
- final byte[] buffer = new byte[fis.available()];
- fis.read(buffer);
- zout.write(buffer);
- zout.closeEntry();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement