Guest User

Untitled

a guest
May 11th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. import java.util.zip.*
  2. import java.nio.channels.*
  3.  
  4.  
  5. ZipOutputStream zipFile = new ZipOutputStream(new FileOutputStream('testme.zip'))
  6. zipFile.putNextEntry(new ZipEntry('testme.txt'))
  7. zipFile.write('Hello World!'.bytes)
  8. zipFile.write('one\n'.bytes)
  9. zipFile.write('two\n'.bytes)
  10.  
  11. zipFile.closeEntry()
  12. zipFile.close()
Add Comment
Please, Sign In to add comment