| . Is part of the java.io package |
| |
| . Is an extension of the InputStream class, an
abstract class that describes the behavior of an input stream |
| |
|
| |
| . Is a high-level class that can be used to read
primitive values and serializable objects from a stream |
| |
| . Has overloaded constructors but the most
useful "chains" to an object that descends from the
InputStream class (such as a FileInputStream object).
For example, if fd is the reference of a File object |
| ObjectInputStream out = new ObjectInputStream(new FileInputStream(fd)); |
| |
| will construct a ObjectInputStream object chained to
a FileInputStream object for reading primitive values and
serializable objects from the file. Because a checked, IOException may occur,
the statement should be enclosed in a try block with an appropriate catch. |
| |
| . Has many useful methods as follows: |
| |
|
| |
| Because a checked, IOException may occur, calls
to these methods should be enclosed in a try block
with an appropriate catch. Consult the Java API
documentation for more details. |
| |