de.esprit.common.io

## Class NullReader

- java.lang.Object
- - java.io.Reader
  - - java.io.InputStreamReader
    - - de.esprit.common.io.NullReader

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Readable

      public class NullReader
      extends java.io.InputStreamReader

  This is the Reader counterpart to `NullInputStream`. In order to produce customized test-data you may provide a customized `NullInputStream` via constructor.
  Author:
    Rainer Buesch

- - ### Field Summary

    - ### Fields inherited from class java.io.Reader

      `lock`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NullReader(long size)`
    `NullReader(long size, boolean isMarkSupported, boolean isThrowEOF)`
    `NullReader(NullInputStream nullStream)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `long` | `getPosition()`
    `long` | `getSize()`
    `void` | `mark(int readLimit)`
    `boolean` | `markSupported()`
    `int` | `read()`
    `int` | `read(char[] chars)`
    `int` | `read(char[] chars, int offset, int length)`
    `void` | `reset()`
    `long` | `skip(long charsToSkip)`

    - ### Methods inherited from class java.io.InputStreamReader

      `getEncoding, ready`

    - ### Methods inherited from class java.io.Reader

      `read`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NullReader

          public NullReader(long size)

    - #### NullReader

          public NullReader(long size,
                    boolean isMarkSupported,
                    boolean isThrowEOF)

    - #### NullReader

          public NullReader(NullInputStream nullStream)

  - ### Method Detail

    - #### getPosition

          public long getPosition()

    - #### getSize

          public long getSize()

    - #### close

          public void close()
                     throws java.io.IOException

      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Overrides:
        `close` in class `java.io.InputStreamReader`
      Throws:
        `java.io.IOException`

    - #### mark

          public void mark(int readLimit)

      Overrides:
        `mark` in class `java.io.Reader`

    - #### markSupported

          public boolean markSupported()

      Overrides:
        `markSupported` in class `java.io.Reader`

    - #### read

          public int read()
                   throws java.io.IOException

      Overrides:
        `read` in class `java.io.InputStreamReader`
      Throws:
        `java.io.IOException`

    - #### read

          public int read(char[] chars)
                   throws java.io.IOException

      Overrides:
        `read` in class `java.io.Reader`
      Throws:
        `java.io.IOException`

    - #### read

          public int read(char[] chars,
                 int offset,
                 int length)
                   throws java.io.IOException

      Overrides:
        `read` in class `java.io.InputStreamReader`
      Throws:
        `java.io.IOException`

    - #### reset

          public void reset()
                     throws java.io.IOException

      Overrides:
        `reset` in class `java.io.Reader`
      Throws:
        `java.io.IOException`

    - #### skip

          public long skip(long charsToSkip)
                    throws java.io.IOException

      Overrides:
        `skip` in class `java.io.Reader`
      Throws:
        `java.io.IOException`

Copyright © 2011 EsprIT-Systems. All Rights Reserved.