Java FileOutputStream Write Byte Array writeBytes(String filePath, boolean append, byte[] content)

Here you can find the source of writeBytes(String filePath, boolean append, byte[] content)

Description

write Bytes

License

Apache License

Declaration

public static void writeBytes(String filePath, boolean append, byte[] content) throws IOException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.FileOutputStream;
import java.io.IOException;

public class Main {

    public static void writeBytes(String filePath, boolean append, byte[] content) throws IOException {
        FileOutputStream fos = new FileOutputStream(filePath, append);
        try {// w  w w  . ja  v a 2 s. c o m
            fos.write(content);
            fos.flush();
        } finally {
            fos.close();
        }

    }
}

Related

  1. writeBytes(final File file, final byte[] bytes)
  2. writeBytes(int[] data, String filename)
  3. writeBytes(int[] data, String filename)
  4. writeBytes(String filename, byte[] bytes)
  5. writeBytes(String filename, byte[] data, int len)
  6. writeBytesInFile(File f, String data)
  7. writeBytesSafely(File aFile, byte theBytes[])
  8. writeBytesToFile(byte[] bfile, String filePath, String fileName)
  9. writeBytesToFile(byte[] byteContent, String fileName)