public class Test
1: // Fig. 14.5: FileDemonstrationTest.java
2: // Testing the FileDemonstration class.
3: import java.util.Scanner;
4: import java.io.File;
5: import java.net.URI;
6:
7: public class Test
8: {
9: public static void main( String args[] )
10: {
11: try
12: {
13: File testFile = new File( "C:\\books\\2004\\sjhtp6e\\frame\\jhtp6_14_Files.fm" );
14: System.out.println( testFile.toURI().toString() );
15: }
16: catch ( Exception exception )
17: {
18: System.out.println( "exception" );
19: }
20: } // end main
21: } // end class Test
22:
23: /*************************************************************************
24: * (C) Copyright 1992-2005 by Deitel & Associates, Inc. and *
25: * Pearson Education, Inc. All Rights Reserved. *
26: * *
27: * DISCLAIMER: The authors and publisher of this book have used their *
28: * best efforts in preparing the book. These efforts include the *
29: * development, research, and testing of the theories and programs *
30: * to determine their effectiveness. The authors and publisher make *
31: * no warranty of any kind, expressed or implied, with regard to these *
32: * programs or to the documentation contained in these books. The authors *
33: * and publisher shall not be liable in any event for incidental or *
34: * consequential damages in connection with, or arising out of, the *
35: * furnishing, performance, or use of these programs. *
36: *************************************************************************/