The java.nio package improves on the basic Java I/O that was available prior to JDK 1.4.
It is designed to interoperate more natively with the underlying file handles (sockets, open files etc) to achieve better performance.
The improvements include true non-blocking I/O, better buffer management, character-set support, channels (similar to Occam's channels) and selectors, and some other ancillery stuff. Most of these classes are designed to be inherently threadsafe.
There are some examples here:
http://java.sun.com/j2se/1.4.2/docs/guide/nio/example/index.html
However, if you are still a beginner with file or network I/O, its better if you start with the simple I/O first. You'll appreciate the NIO improvements better afterwards.