Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.zip.*
- import java.nio.channels.*
- ZipOutputStream zipFile = new ZipOutputStream(new FileOutputStream('testme.zip'))
- zipFile.putNextEntry(new ZipEntry('testme.txt'))
- zipFile.write('Hello World!'.bytes)
- zipFile.write('one\n'.bytes)
- zipFile.write('two\n'.bytes)
- zipFile.closeEntry()
- zipFile.close()
Add Comment
Please, Sign In to add comment