If you have a zip file on disk, get the size using java.io.File.length(), allocate a byte array "buffer" of that size, open the file with FileInputStream, call read(buffer), close the FileInputStream.
If you have a byte array, open the file with a FileOutputStream, call write(byteArray), close the FileOutputStream.
Here is a fine tutorial on
Java I/O.