Android examples for File Input Output:OutputStream
string To Output Stream
//package com.java2s; import java.io.IOException; import java.io.OutputStream; public class Main { public static void stringToOutputStream(String str, OutputStream output) { if (str != null && output != null) { try { output.write(str.getBytes()); } catch (Exception e) { e.printStackTrace();/*from w w w .j a v a 2s .co m*/ } finally { closeOutputStream(output); } } } public static void closeOutputStream(OutputStream output) { if (output != null) { try { output.close(); } catch (IOException e) { } } } }