daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Jan 16th, 2018 184 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. +--------------------------------------------------------+---------------------------------------------------------------+
  2. |                           IO                           |                          NIO(New IO)                          |
  3. +--------------------------------------------------------+---------------------------------------------------------------+
  4. | Stream oriented (no cache)                             | Channels/Buffers oriented (with cache)                        |
  5. | Thread Blocking IO(Synchronous)                        | Non Thread blocking IO(Asynchronous i.e notification based)   |
  6. | read and write can do one byte/char at a time.         | Channel can read and write byte buffer(not char buffer).      |
  7. | readers are for read only, writers are for write only. | Channel can read multiple byte at a time.                     |
  8. | Buffer creates in JVM heap memory.                     | Buffer can be outside or in-memory of JVM.                    |
  9. | Charset is limited ot UTF-8.                           | Charset support expanded to UTF-16 and more.                  |
  10. +--------------------------------------------------------+---------------------------------------------------------------+
  11.    
  12. +==+==================+======================+=======================+===================+====================+
  13.     |                  |                 Byte Based                   |            Character Based             |
  14.     |  Context         | Input                | Output                | Input             | Output             |
  15.     +==================+======================+=======================+===================+====================+
  16.     | Basic            | InputStream          | OutputStream          | Reader            | Writer             |
  17.     |                  |                      |                       | InputStreamReader | OutputStreamWriter |
  18.     +------------------+----------------------+-----------------------+-------------------+--------------------+
  19.     | Arrays           | ByteArrayInputStream | ByteArrayOutputStream | CharArrayReader   | CharArrayWriter    |
  20.     +------------------+----------------------+-----------------------+-------------------+--------------------+
  21.     | Files            | FileInputStream      | FileOutputStream      | FileReader        | FileWriter         |
  22.     |                  | RandomAccessFile     | RandomAccessFile      |                   |                    |
  23.     +------------------+----------------------+-----------------------+-------------------+--------------------+
  24.     | Pipes            | PipedInputStream     | PipedOutputStream     | PipedReader       | PipedWriter        |
  25.     +------------------+----------------------+-----------------------+-------------------+--------------------+
  26.     | Buffering        | BufferedInputStream  | BufferedOutputStream  | BufferedReader    | BufferedWriter     |
  27.     +------------------+----------------------+-----------------------+-------------------+--------------------+
  28.     | Filtering        | FilterInputStream    | FilterOutputStream    | FilterReader      | FilterWriter       |
  29.     +------------------+----------------------+-----------------------+-------------------+--------------------+
  30.     | Parsing          | PushbackInputStream  |                       | PushbackReader    |                    |
  31.     |                  | StreamTokenizer      |                       | LineNumberReader  |                    |
  32.     +------------------+----------------------+-----------------------+-------------------+--------------------+
  33.     | Strings          |                      |                       | StringReader      | StringWriter       |
  34.     +------------------+----------------------+-----------------------+-------------------+--------------------+
  35.     | Data             | DataInputStream      | DataOutputStream      |                   |                    |
  36.     +------------------+----------------------+-----------------------+-------------------+--------------------+
  37.     | Data - Formatted |                      | PrintStream           |                   | PrintWriter        |
  38.     +------------------+----------------------+-----------------------+-------------------+--------------------+
  39.     | Objects          | ObjectInputStream    | ObjectOutputStream    |                   |                    |
  40.     +------------------+----------------------+-----------------------+-------------------+--------------------+
  41.     | Utilities        | SequenceInputStream  |                       |                   |                    |
  42.     +------------------+----------------------+-----------------------+-------------------+--------------------+
RAW Paste Data
Top