Java FileOutputStream Write saveFile(final File file, final byte[] dataToSave)

Here you can find the source of saveFile(final File file, final byte[] dataToSave)

Description

save File

License

Apache License

Declaration

private static boolean saveFile(final File file, final byte[] dataToSave) throws IOException 

Method Source Code

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

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

public class Main {
    private static boolean saveFile(final File file, final byte[] dataToSave) throws IOException {
        final FileOutputStream fos = new FileOutputStream(file);
        fos.write(dataToSave);/*  ww  w  .ja  va  2  s .c  o  m*/
        fos.close();
        return true;
    }
}

Related

  1. saveFile(File file, byte[] contenido)
  2. saveFile(File file, InputStream is)
  3. saveFile(File file, String fileName, String filesDirectory)
  4. saveFile(File file, String savePath)
  5. saveFile(final byte[] bytes, final File target)
  6. saveFile(final File file, final String contents, final String encoding)
  7. saveFile(final InputStream in, final String path, final String fileName)
  8. saveFile(final String filename, final String s1, final String textOut, final String s3)
  9. saveFile(InputStream is, File file)