Class FileInputStreamReader

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

    public final class FileInputStreamReader
    extends java.io.Reader
    The Class FileInputStreamReader.
    Since:
    1.6 (08.12.2015)
    Version:
    $Revision: 1.6 $
    Author:
    oliver
    • Field Summary

      • Fields inherited from class java.io.Reader

        lock
    • Constructor Summary

      Constructors 
      Constructor Description
      FileInputStreamReader​(java.io.File file, java.nio.charset.Charset encoding)
      Instantiates a new file input stream reader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Close.
      boolean equals​(java.lang.Object obj)
      Equals.
      int hashCode()
      Hash code.
      void mark​(int readAheadLimit)
      Mark.
      boolean markSupported()
      Mark supported.
      int read()
      Read.
      int read​(char[] cbuf)
      Read.
      int read​(char[] cbuf, int off, int len)
      Read.
      int read​(java.nio.CharBuffer target)
      Read.
      boolean ready()
      Ready.
      void reset()
      Reset.
      long skip​(long n)
      Skip.
      java.lang.String toString()
      To string.
      • Methods inherited from class java.io.Reader

        nullReader, transferTo
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FileInputStreamReader

        public FileInputStreamReader​(java.io.File file,
                                     java.nio.charset.Charset encoding)
                              throws java.io.FileNotFoundException
        Instantiates a new file input stream reader.
        Parameters:
        file - the file
        encoding - the encoding
        Throws:
        java.io.FileNotFoundException - the file not found exception
    • Method Detail

      • hashCode

        public int hashCode()
        Hash code.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the int
        See Also:
        Object.hashCode()
      • read

        public int read​(java.nio.CharBuffer target)
                 throws java.io.IOException
        Read.
        Specified by:
        read in interface java.lang.Readable
        Overrides:
        read in class java.io.Reader
        Parameters:
        target - the target
        Returns:
        the int
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
        See Also:
        Reader.read(java.nio.CharBuffer)
      • read

        public int read()
                 throws java.io.IOException
        Read.
        Overrides:
        read in class java.io.Reader
        Returns:
        the int
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
        See Also:
        Reader.read()
      • equals

        public boolean equals​(java.lang.Object obj)
        Equals.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the obj
        Returns:
        true, if successful
        See Also:
        Object.equals(java.lang.Object)
      • read

        public int read​(char[] cbuf)
                 throws java.io.IOException
        Read.
        Overrides:
        read in class java.io.Reader
        Parameters:
        cbuf - the cbuf
        Returns:
        the int
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
        See Also:
        Reader.read(char[])
      • read

        public int read​(char[] cbuf,
                        int off,
                        int len)
                 throws java.io.IOException
        Read.
        Specified by:
        read in class java.io.Reader
        Parameters:
        cbuf - the cbuf
        off - the off
        len - the len
        Returns:
        the int
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
        See Also:
        Reader.read(char[], int, int)
      • skip

        public long skip​(long n)
                  throws java.io.IOException
        Skip.
        Overrides:
        skip in class java.io.Reader
        Parameters:
        n - the n
        Returns:
        the long
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
        See Also:
        Reader.skip(long)
      • ready

        public boolean ready()
                      throws java.io.IOException
        Ready.
        Overrides:
        ready in class java.io.Reader
        Returns:
        true, if successful
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
        See Also:
        Reader.ready()
      • markSupported

        public boolean markSupported()
        Mark supported.
        Overrides:
        markSupported in class java.io.Reader
        Returns:
        true, if successful
        See Also:
        Reader.markSupported()
      • mark

        public void mark​(int readAheadLimit)
                  throws java.io.IOException
        Mark.
        Overrides:
        mark in class java.io.Reader
        Parameters:
        readAheadLimit - the read ahead limit
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
        See Also:
        Reader.mark(int)
      • reset

        public void reset()
                   throws java.io.IOException
        Reset.
        Overrides:
        reset in class java.io.Reader
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
        See Also:
        Reader.reset()
      • close

        public void close()
                   throws java.io.IOException
        Close.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in class java.io.Reader
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
        See Also:
        Reader.close()
      • toString

        public java.lang.String toString()
        To string.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the string
        See Also:
        Object.toString()