Here you can find the source of writeString(OutputStream out, String s)
public static void writeString(OutputStream out, String s) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { public static void writeString(OutputStream out, String s) throws IOException { for (int i = 0; i < s.length(); i++) writeChar(out, s.charAt(i)); }/*from www .ja v a 2s . c o m*/ public static void writeChar(OutputStream out, char c) throws IOException { out.write((byte) c); } }