A Stream is an abstraction that either produces or consumes information. A stream is linked to a physical device by the Java I/O system. All streams behave in the same manner, even if the actual physics devices to which they are linked differ. Thus the same I/O classes and methods can be applied to any type of device. This means that an input stream can abstract many different kinds of input, from a disk file, a keyboard, or network or socket. Streams are clean ways to deal with input/output without having every part of the code understand the difference between a keyboard and network. Java implements streams within class hierarchies defined in the Java package.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment