Here you can find the source of saveToTextFile(String filename, byte[] text)
public static void saveToTextFile(String filename, byte[] text) throws IOException
//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 }