Java FileOutputStream Write saveToTextFile(String filename, byte[] text)

Here you can find the source of saveToTextFile(String filename, byte[] text)

Description

save To Text File

License

Apache License

Declaration

public static void saveToTextFile(String filename, byte[] text) throws IOException 

Method Source Code


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

import java.io.*;

public class Main {
    public static void saveToTextFile(String filename, byte[] text) throws IOException {

        FileOutputStream out = new FileOutputStream(filename + ".ctron");

        byte[] buffer = text;
        out.write(buffer, 0, buffer.length);

    }//from  w  w w . j  av a  2s . c o  m
}

Related

  1. saveToFile(String baseName, String extension, byte[] content)
  2. saveToFile(String data, File file)
  3. saveToFile(String data, File file)
  4. saveToFile(String fileName, String fileCode, File dir, String fileExtention)
  5. saveToFile(String filePath, InputStream in)
  6. SaveToZipSB(File file, String ZippedFile, StringBuilder sb)
  7. saveZip(String fileName, Map dataMap)
  8. saveZipFile(String zipFileName, File toBeZipped)