Class UnsynchronizedReader

java.lang.Object
java.io.Reader
org.apache.commons.io.input.UnsynchronizedReader
All Implemented Interfaces:
Closeable, AutoCloseable, Readable
Direct Known Subclasses:
UnsynchronizedBufferedReader

public abstract class UnsynchronizedReader extends Reader
A Reader without any of the superclass' synchronization.
Since:
2.17.0
  • Constructor Details

  • Method Details

    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in class Reader
      Throws:
      IOException
    • isClosed

      public boolean isClosed()
      Tests whether this instance is closed; if close() completed successfully.
      Returns:
      whether this instance is closed.
    • setClosed

      public void setClosed(boolean closed)
      Sets whether this instance is closed.
      Parameters:
      closed - whether this instance is closed.
    • skip

      public long skip(long n) throws IOException
      Skips characters by reading from this instance. This method will block until:
      • some characters are available,
      • an I/O error occurs, or
      • the end of the stream is reached.
      Overrides:
      skip in class Reader
      Parameters:
      n - The number of characters to skip.
      Returns:
      The number of characters actually skipped.
      Throws:
      IllegalArgumentException - If n is negative.
      IOException - If an I/O error occurs.