Here you can find the source of WriteString(OutputStream output, String string)
static void WriteString(OutputStream output, String string) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.io.OutputStream; public class Main { static void WriteString(OutputStream output, String string) throws IOException { for (int loop = 0; loop < string.length(); ++loop) output.write((byte) (string.charAt(loop))); }//from w w w . j a v a 2s . c o m }