Re: Buffered reading seems to corrupt data stream



"Ronny Schütz" wrote in message news:pe2pl8-h72.ln1@xxxxxxxxxxxxxxxxxxx

It might be, that the BufferedInputStream used for the first read
already read data belonging to the second message, that will get lost
when you dispose the BufferedInputStream and will be missing from the
next read call. The garbage size read is most likely actually a part of
the payload bytes. Try to synchronize server and client somehow to
verify. Better reuse the complete stream chain.

Yes, you are right. By creating only one DataInputStream and reusing it each time I have been able to resolve this issue. Thanks.

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu0llSixFour@xxxxxxxxx
[Replace the "SixFour" with numbers to email me]

.



Relevant Pages

  • Re: Buffered reading seems to corrupt data stream
    ... when you dispose the BufferedInputStream and will be missing from the ... Better reuse the complete stream chain. ...
    (comp.lang.java.programmer)
  • Re: A complete schism with numbers is needed - adacrypt
    ... affections actively seem charts, the pcs often dispose with respect to the ... lost defaults. ...
    (sci.crypt)
  • Re: $3 Sharps disposal fee.
    ... used needle into the sand at the beach did. ... Dispose of your sharps as the law dictates and hopefully everyone else ... For want of a shoe the horse was lost. ...
    (alt.support.diabetes)
  • question about netflix throttling
    ... I returned 6 DVDs in the last month that went missing. ... Then I called Netflix and the guy unfroze my account ... Monday morning the lost DVDs started showing up on my account as ...
    (alt.video.dvd)
  • Re: OT - McCanns To Meet The Pope
    ... if I'd lost a kiddie I'd not let the others out ... there are always children on the missing persons list.. ... hundreds of kids missing. ... Because the media went and built them a bandwagon, ...
    (uk.media.tv.misc)