Java IO (javase 6)- Help me understand the effects of my sample use of Streams and Writers...

Posted by Daddy Warbox on Stack Overflow See other posts from Stack Overflow or by Daddy Warbox
Published on 2010-02-11T09:27:36Z Indexed on 2010/04/12 3:53 UTC
Read the original article Hit count: 316

Filed under:
|
|
|
|
BufferedWriter out = new BufferedWriter( new OutputStreamWriter( new BufferedOutputStream( new FileOutputStream("out.txt") ) ) );

So let me see if I understand this: A byte output stream is opened for file "out.txt". It is then fed to a buffered output stream to make file operations faster. The buffered stream is fed to an output stream writer to bridge from bytes to characters. Finally, this writer is fed to a buffered writer... which adds another layer of buffering?

Hmm...

© Stack Overflow or respective owner

Related posts about java

Related posts about javase