go to previous page   go to home page   go to next page

Answer:

DataInputStream and DataOutputStream


Copy Loop

DataInputStream  instr;
DataOutputStream outstr;
. . . .
int data;
while ( true )
{
  data = instr.readUnsignedByte() ;
  outstr.writeByte( data ) ;
}

The main loop of the program repeatedly reads a byte from the input file and then writes that byte to the output file.

The low-order byte of the integer variable data holds the byte that is read from the input file and written to the output file.


QUESTION 16:


go to previous page   go to home page   go to next page