private void writeFile(File file,byte[] input,CompressionMode mode) throws IOException {
  try (OutputStream os=getOutputStreamForMode(mode,new FileOutputStream(file))){
    os.write(input);
  }
 }

private void writeFile ( File file , byte [ ] input , CompressionMode mode ) throws IOException { try ( OutputStream os = getOutputStreamForMode ( mode , new FileOutputStream ( file ) ) ) { os . write ( input ) ; } }
writes a single output file .
