flush()
Spent about half an hour ..trying to see if the buffers were leaking or If I got the pointers wrong. Guess what the last packet was being written to the disk due to the goofiest reason possible. yes I forgot to flush()
if you find your data not being written to the file specially the last few bytes. The reason is probably the data is still in the stream and not flushed to the disk. do a fileHandle.flush() and it would force the data out to the disk.
Moral: Flush () before you slush at the language
Sri :: Nov.14.2008 :: programming :: No Comments »