Utility method that eads the input stream fully and writes the bytes to
the current entry in the output stream.
byte[] buf = new byte[4096];
int len = 0;
while (len != -1) {
try {
len = is.read(buf, 0, buf.length);
} catch (EOFException eof){
break;
}
if(len != -1) {
os.write(buf, 0, len);
}
}
os.flush();