DataInputStream and DataOutputStream
DataInputStream
DataOutputStream
The core of the program looks like this:
DataInputStream instr; DataOutputStream outstr; . . . . int data; while ( true ) { data = instr.readUnsignedByte() ; outstr.writeByte( data ) ; }
Repeatedly, one byte at at time is read and written, using the low-order byte of data as an intermediate location.
data