Problem with writing a Line to a Data Stream
I am writing a server <--> applet type of game.
I want to send player actions as strings that I can parse for neccessary
data.
First I used DataInputStream and DataOutputStream, but I found that
the readLine method of DataInputStream is depricated and sun
recommends the use of BufferedReader instead.
This works fine, but I can not find a corresponding writeLine in either
BufferedWriter or DataOutputStream. The best I have come up with is
DataOutputStream.writeChars(String s) but the string I read at the
server arrives with a white space between each character.
I.e. sending String s = "test" from the client generates "t e s t " at the
server.
I guess I could loop through the string and strip any white space but
there has to be a more elegant solution.
Grateful for any help,
Logros

