public class DataIOStream
extends java.lang.Object
Constructor and Description |
---|
DataIOStream() |
Modifier and Type | Method and Description |
---|---|
static void |
input()
Reads input student name, grade and credits data from a binary
DataInputStream file and writes them to the terminal window.
|
static void |
main(java.lang.String[] args)
Driver method for DataOutputStream and DataInputStream demo.
|
static void |
output()
Writes output student name, grade and credits data to a binary
DataOutputStream file.
|
public static void main(java.lang.String[] args)
args
- the String[] array command line parameterpublic static void output() throws java.io.IOException
java.io.IOException
- for any file operation failure related to the 'temp.data' filejava.util.InputMismatchException
- if user enters non-integer input for 'credits'public static void input() throws java.io.IOException
java.io.IOException
- for any file operation related to the 'temp.data' filejava.io.EOFException
- for an attempt to read past the end of the 'temp.data' file