Way2Java

View All IO

Advise for a fresher

Do not expect command on Java I/O Streams overnight. It is ocean, until and unless not properly approached, it leaves in a very great confusion, of course without pointers (feeling of when you lost alone in an unknown forest). It is a ocean due to number of classes, and these classes are given to make your programming easy (not to confuse you). I feel the following is a better way to penetrate into Java Input/Output Tutorial; follow the following order of reading.

    A) General Programs
  1. Java I/O Streams – Overview
  2. Byte streams and Character streams
  3. Byte streams vs Character streams
  4. Semantics of File Copying
  5. Performance drawbacks of file copying
  6. BufferedInputStream and BufferedOutputStream
  7. Chaining of Streams
  8. DataInputStream and DataOutputStream – File Copying
  9. Skipping a part of a File
  10. Keyboard Input (Scanf in Java)

  11. Keyboard Input – DataInputStream
  12. Keyboard Input – BufferedReader
  13. Keyboard Input – Scanner – No parsing
  14. Scanner – Checking for Tokens
  15. SequenceInputStream – Merging Files
  16. ByteArrayInputStream
  17. ByteArrayOutputStream
  18. StringBufferInputStream
  19. Using markSupported(), mark() & reset()
  20. PrintStream
  21. Filter Streams in java.io Package
  22. Giving Line Numbers – LineNumberInputStream
  23. File Copying – FileReader & FileWriter
  24. BufferedReader & BufferedWriter
  25. CharArrayWriter – Storing Data
  26. StringReader
  27. StringWriter – Storing Data
  28. CharArrayReader – Reading from Character Array
  29. PrintWriter – Formatting Data
  30. PushbackReader – Pushing out Character
  31. Using OutputStreamWriter
  32. RandomAccessFile – Reading Sequentially and Randomly
  33. LineNumberReader – Giving Line Numbers
  34. PipedInputStream and PipedOutputStream
  35. File class – Retrieving Metadata of File
  36. File class – Changing File Properties
  37. StreamTokenizer – Tokenizing a Stream
  38. Performance tips in file copying
    B) Compare and Contrast I/O classes. Important for Interviews.
  1. Byte streams vs Character streams
  2. PrintStream vs PrintWriter
  3. StringWriter vs StringBuilder
  4. StreamTokenizer vs StringTokenizer
    C) Miscellaneous increasing your programming skills.
  1. System.out.println()?
  2. What is System.in?
  3. Closeable and Flushable interfaces
  4. Number of Lines in a File
  5. Reading and writing arrays and strings
  6. Wrapper Streams
  7. Filter Streams
  8. Byte streams vs Character streams