The DataOutputStream has a method writeChars(String s) which will write the String s, writing one char at a time. Since this is part of the OutputStream class it writes it in bytes so you get two bytes per char and once the entire string is written the counter written is incremented by twice the length of the string. Bill
bill. perhaps you can help me. Why would I want to write a String using a DataOutputStream? I would think that I would always use a Writer of some sort, wrapped in a BufferedWriter and probably that wrapped in a PrintWriter.