Java IO – NIO

Java IO Basics and understanding Structure :

  1. What is a Stream and use of it
  2. Types of Stream
    1. Binary Stream (For Audio/Video and other files)
      1. Input Stream (Abstract Class)
      2. Output Stream (Abstract Class)
    2. Character Stream (For Printable characters)
      1. Reader (Abstract Class)
      2. Writer (Abstract Class)

Java File IO Binary Stream API

  1. Input Stream (9 classes)
    1. FileInputStream (Read one byte Data from File as it is) (Important)
    2. ByteArrayInputStream (Read data inform of array)
    3. FilterInputStream
      1. DataInputStream (Read one byte Data from File in primitive datatype)(Important)
      2. BufferedInputStream (Reading Fast )
    4. ObjectInputStream (Reading as a complete Object)(Important)
    5. PipedInputStream (Passing a Stream to another)
    6. SequenceInputStream (Read Data from multiple file)
    7. StringBufferInputStream
  2. Output Stream Types (8 classes)FileOutputStream
    1. ByteArrayOutputStream
    2. FilterOutputStream
      1. DataOutputStream
      2. BufferedOutputStream
      3. PrintStream (No conversion – no byte conversion – Write as it is )
    3. ObjectOutputStream
    4. PipedOutputStream
  3. Closeable and AutoCloseable and why it was introduced
  4. Flushable Interface

Java File IO Character Stream API

  1. File
  2. FileWriter (character by character)
  3. FileReader (character by character)
  4. BufferedWriter (line by line)
  5. BufferedReader (line by line)
  6. PrintWriter (line by line with primitive support)
  7. InputStreamReader and OutputStreamWriter (For Image,Video and Audio Read and Write)
  8. RandomAccessFile

Java NIO

Reference :

NIO Reference :

http://tutorials.jenkov.com/java-nio/index.html