Answer:
DataInputStream and DataOutputStream
Copy Loop
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 the integer variable data
as an intermediate location.
QUESTION 15:
- How does the loop end?
- How should this be handled?