June 2018
Beginner
722 pages
18h 47m
English
Writing and reading data to and from external memory (a hard drive, for example) is a much slower operation than other processes that happen in the memory. The already existing classes and interfaces of the java.io package worked fine, but once in a while, the performance would bottleneck. The new java.nio package was created to provide more effective I/O support.
The java.io implementation was based on stream processing, which, as we saw in the previous section, is basically a blocking operation, even if some kind of concurrency is happening behind the scenes. To increase the speed, the java.nio implementation was based on reading/writing to/from a buffer in the memory. Such a design allowed us to separate ...
Read now
Unlock full access