I've been exploring the java.io package a lot lately, and I've been wondering where can I find the exact processes that the abstract classes inside InputStream and OutputStream do.
I'm dazzled because, at least according to the source code, the core methods are all abstract (e.g. InputStream.read()
and OutputStream.write(int b)
). I'm especially concerned by the close methods, whose javadocs explicitly say they do nothing:
Closes this input stream and releases any system resources associated with the stream.
The
close
method ofInputStream
does nothing.
Well, input streams obviously write while output streams read, and definitely close()
has to do the flushing and resource releasing.
Somebody able to give me an explanation?