Package patterntesting.runtime.io
Class FileInputStreamReader
- java.lang.Object
-
- java.io.Reader
-
- patterntesting.runtime.io.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
-
-
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.
-
-
-
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 fileencoding
- the encoding- Throws:
java.io.FileNotFoundException
- the file not found exception
-
-
Method Detail
-
hashCode
public int hashCode()
Hash code.- Overrides:
hashCode
in classjava.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 interfacejava.lang.Readable
- Overrides:
read
in classjava.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 classjava.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 classjava.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 classjava.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 classjava.io.Reader
- Parameters:
cbuf
- the cbufoff
- the offlen
- 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 classjava.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 classjava.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 classjava.io.Reader
- Returns:
- true, if successful
- See Also:
Reader.markSupported()
-
mark
public void mark(int readAheadLimit) throws java.io.IOException
Mark.- Overrides:
mark
in classjava.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 classjava.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 interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in classjava.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 classjava.lang.Object
- Returns:
- the string
- See Also:
Object.toString()
-
-