Re: Buffered reading seems to corrupt data stream
- From: "Qu0ll" <Qu0llSixFour@xxxxxxxxx>
- Date: Tue, 4 Oct 2011 10:54:55 +1100
"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]
.
- References:
- Buffered reading seems to corrupt data stream
- From: Qu0ll
- Re: Buffered reading seems to corrupt data stream
- From: Qu0ll
- Re: Buffered reading seems to corrupt data stream
- From: Ronny Schütz
- Buffered reading seems to corrupt data stream
- Prev by Date: loading dll within a jar
- Next by Date: Re: loading dll within a jar
- Previous by thread: Re: Buffered reading seems to corrupt data stream
- Next by thread: Re: Buffered reading seems to corrupt data stream
- Index(es):
Relevant Pages
|