Java FileOutputStream Write save(String data, String encoding, String file)

Here you can find the source of save(String data, String encoding, String file)

Description

save

License

Open Source License

Declaration

static public void save(String data, String encoding, String file) throws IOException 

Method Source Code

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

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

public class Main {
    static public void save(String data, String encoding, String file) throws IOException {
        FileOutputStream os = new FileOutputStream(file);
        byte[] buf = data.getBytes(encoding);
        os.write(buf);/*from   w  w w  .j  a v a  2s . c om*/
        os.close();
    }
}

Related

  1. save(File file, byte[] content)
  2. save(File file, final byte[] encoded)
  3. save(final InputStream in, final File file)
  4. save(InputStream in, File f)
  5. save(String content, String fileName)
  6. save(String f, byte[] data)
  7. save(String filename, byte[] bytes)
  8. save(String path, byte[] content, IProgressMonitor monitor)
  9. saveArray(byte[] pictureBytes, OutputStream stream)