I just read ...
Classes that work with streams are located in two packages: java.io and java.nio. Classes from the former implement blocking of input/output (I/O): When bytes are being read/written by a process, they become unavailable for other threads of execution. The latter package offers non-blocking I/O with improved performance.
... and would like to understand this a bit more. Does blocking only impact the single relevant thread, but leave the source (i.e. file or database) itself unblocked, ready to be accessed by other streams? Or does the blocking actually prevent the source from being accessed itself, until the current thread is done with the reading?
Blocking basically refers to when a thread invokes a read() or write(), it is blocked from doing anything else until there is some data to read or the data is written. The thread can do NOTHING else in the meantime.
So blocking is to do with the thread itself, not the data source.