Java FileOutputStream Create writeFileBinary(String filename, byte[]... dataArrays)

Here you can find the source of writeFileBinary(String filename, byte[]... dataArrays)

Description

write File Binary

License

Open Source License

Declaration

public static void writeFileBinary(String filename, byte[]... dataArrays) throws IOException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.*;

public class Main {
    public static void writeFileBinary(String filename, byte[]... dataArrays) throws IOException {

        DataOutputStream dos = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(filename)));

        for (byte[] data : dataArrays) {
            dos.write(data);/*w  w w . j av a2  s .  co  m*/
        }

        dos.flush();
        dos.close();
    }
}

Related

  1. writeFile(ZipEntry entry, ZipFile zipFile, File file)
  2. writeFile0(File file, CharSequence content, Iterable lines)
  3. writeFileAsBytes(String fullPath, byte[] bytes)
  4. writeFileAsString(final File filePath, final String output, final String charset)
  5. writeFileAsString(String filename, String contents)
  6. writeFileByBytes(String content, String filename)
  7. writeFileByChar(String content, String filename, String encoding)
  8. writeFileByLine(String content, String filename, boolean append)
  9. writeFileBytes(File pFile, byte[] pBytes)