The read()
method blocks until a byte is available on stream for an input resource(keyboard/file/network/program).
public abstract int read() throws IOException
1) For a single threaded Java program, Does blocking of read()
enable kernel to move java process to blocked state?
2) For a multi-threaded Java program, Does blocking of read()
on one thread allow other threads to occupy CPU slice? Having java process continue in Running state until it's CPU time slice.