Thursday, November 12, 2009

What is wrong with BufferedOutputStream

I was writing a stream into a file. I initialized a BufferedOutputStream with new BufferedOutputStream(new FileOutputSteam("filename");

And I closed all input and output stream after job is done. But the file is always corrupted, there's about 4k missing from the original input stream.

But after I removed the BufferedOutputStream, the problem solved. Why is that?

No comments:

Google+