O'Reilly logo

Java™ Performance and Scalability, Volume 1: Server-Side Programming Techniques by Dov Bulka

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. I/O Streams

Java I/O streams are capable of reading and writing data to and from a variety of end points. Sockets, files, strings, character arrays, and more. All these are fair game for the I/O machinery. We are not going to inspect each and every one. What we want to do is flush out the fundamental performance principles underlying this jungle of combinations of I/O devices and stream classes. We can get there by drilling into a single dimension of streaming file I/O. It will expose the fundamental issues. We will find out that the cost of writing and reading data to and from Java I/O streams boils down to two central issues: buffering and Unicode conversions. Every optimization discussed in this chapter will eventually be reduced ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required