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 ...
Get Java™ Performance and Scalability, Volume 1: Server-Side Programming Techniques now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.