I'm not sure if this belongs to IO forum or this forum, but pls help. I read datagrams and write the data to file. I use DatagramPacket and pass a byte array of size 1024. Then I use BufferedWriter coupled with FileWriter to write to file. When i send some datagrams slowly 1 by 1, it gets into the file fully. but if i send at a faster rate, say 2 datagrams 1 after the other, the last character in alternate messages are lost. i.e, if i send a datagram message "Hello" 2 times, i get in the file "Hello", followed by "Hell". Please help me to correct this.
Thanks<br />Karthik<br />SCJP 1.4, CCNA.<br /> <br />"Success is relative. More the success, more the relatives."