Course List: http://www.c-jump.com/bcc/

Text files, character streams, formatted I/O


  1. I/O class hierarchy
  2. Writing text to character stream
  3. Formatted output: PrintWriter class
  4. PrintWriter print( ) and println( )
  5. Writing delimited text file
  6. Reader/Writer hierarchy -- character streams
  7. Reading text from a character stream
  8. Reader hierarchy -- character input streams
  9. BufferedReader class
  10. BufferedReader, reading text file
  11. BufferedReader, reading delimited text file
  12. Formatted input with Scanner and FileReader
  13. A subset of the IOException hierarchy
  14. Code that handles I/O exceptions
  15. Writer hierarchy -- character output streams
  16. Unbuffered character file I/O
  17. Buffered character file I/O
  18. Sequential output of ASCII files
  19. Example: Sequential output of ASCII files
  20. Example: Sequential input of ASCII files

1. I/O class hierarchy



2. Writing text to character stream



3. Formatted output: PrintWriter class


  • Common methods of the PrintWriter class:

    
     Method              Throws
     -----------------   ----------
     print(argument)     None
     println(argument)   None
     flush()             IOException
     close()             IOException
    
    
  •   PrintStream and PrintWriter


4. PrintWriter print( ) and println( )



5. Writing delimited text file



6. Reader/Writer hierarchy -- character streams



7. Reading text from a character stream



8. Reader hierarchy -- character input streams



9. BufferedReader class



10. BufferedReader, reading text file



11. BufferedReader, reading delimited text file



12. Formatted input with Scanner and FileReader



13. A subset of the IOException hierarchy



14. Code that handles I/O exceptions



15. Writer hierarchy -- character output streams



16. Unbuffered character file I/O



17. Buffered character file I/O



18. Sequential output of ASCII files



19. Example: Sequential output of ASCII files



20. Example: Sequential input of ASCII files