Specifications

Sun Services
Java™ Programming Language
Module 14, slide 15 of 22
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision F
Buffered Streams
14
15 while ( line != null ) {
16 // write the line out to the output file
17 bufOutput.write(line, 0, line.length());
18 bufOutput.newLine();
19 // read the next line
20 line = bufInput.readLine();
21 }
22 bufInput.close();
23 bufOutput.close();
24 } catch (IOException e) {
25 e.printStackTrace();
26 }
27 }
28 }