Thursday, September 07, 2006

Java I/O Best Practices

I/O represents Input and Output streams. We use streams to read from or write to devices such as file or network or console. java.io package provides I/O classes to manipulate streams. This package supports two types of streams - binary streams which handle binary data and character streams which handle character data. InputStream and OutputStream are high level interfaces for manipulating binary streams. Reader and Writer are high level interfaces for manipulating character streams.

  1. Reading and writing data using default behavior of some streams that is byte by byte  read/write causes slow performance.
  2. Buffered input streams and buffered output streams increase performance.
  3. Custom buffering increases performance significantly.

Get more information

Tags: java io, best practices, streams, performance, improve java io

Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com

Comments on "Java I/O Best Practices"