Java tutorial
//package com.java2s; import java.io.DataOutputStream; import java.io.IOException; public class Main { public static void writeString(final DataOutputStream output, final String value) throws IOException { for (int i = 0; i < value.length(); i++) { output.write(value.charAt(i)); } } }