Re: Buffered reading seems to corrupt data stream

On Tue, 4 Oct 2011 02:26:45 +1100, "Qu0ll" <Qu0llSixFour@xxxxxxxxx>
wrote, quoted or indirectly quoted someone who said :

I forgot to mention that there is only *one* input stream (is) and output
stream (os) being used in to the above code. Once the connection between
client and server is established I repeatedly send the fixed byte array data
(fixed for testing purposes) on the connected stream.

You do know the dataoutput stream is a pure binary stream with counted
Strings. There should not be any sort of encoding involved.

Have a look at code generated by
to see how it compares with yours. I have never had trouble with
buffered or unbufferd DataOutput.

Roedy Green Canadian Mind Products
It should not be considered an error when the user starts something
already started or stops something already stopped. This applies
to browsers, services, editors... It is inexcusable to
punish the user by requiring some elaborate sequence to atone,
e.g. open the task editor, find and kill some processes.


Relevant Pages