Java FileOutputStream Write Byte Array writeBytes(byte[] bytes, String file)

Here you can find the source of writeBytes(byte[] bytes, String file)

Description

write Bytes

License

Open Source License

Declaration

public static void writeBytes(byte[] bytes, String file) throws IOException 

Method Source Code

//package com.java2s;
/**//w  w w.j  a  v  a2 s.  co  m
* This file is part of dev.utils.
*
* dev.utils is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* You should have received a copy of the GNU General Public License
* along with dev.utils.  If not, see <http://www.gnu.org/licenses/>.
*
* File      : FileHelper.java
* Created   : November 28, 2006, 5:13 PM
*/

import java.io.FileOutputStream;

import java.io.IOException;

public class Main {
    public static void writeBytes(byte[] bytes, String file) throws IOException {
        FileOutputStream fos = new FileOutputStream(file);
        fos.write(bytes);
        fos.close();
    }
}

Related

  1. writeBytes(byte[] data, File file)
  2. writeBytes(File aFile, byte theBytes[])
  3. writeBytes(File dest, byte[] data, int off, int len, boolean append)
  4. writeBytes(File f, byte[] b)