Java examples for File Path IO:DataOutputStream
write String to DataOutputStream
//package com.java2s; import java.io.DataOutputStream; import java.io.IOException; public class Main { public static void writeString(DataOutputStream out, String string) throws IOException { out.writeInt(string.length());/* ww w.j av a 2 s . co m*/ out.writeChars(string); } public static void writeInt(DataOutputStream out, int i) throws IOException { out.writeInt(i); } }