Class FileInputStreamReader
java.lang.Object
java.io.Reader
clazzfish.monitor.io.FileInputStreamReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Readable
The Class FileInputStreamReader is a small wrapper to an
InputStreamReader
for files. It was copied from the
PatternTesting project.- Author:
- oliver
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionFileInputStreamReader
(File file, Charset encoding) Instantiates a new file input stream reader. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close.boolean
Equals.int
hashCode()
Hash code.void
mark
(int readAheadLimit) Mark.boolean
Mark supported.int
read()
Read.int
read
(char[] cbuf) Read.int
read
(char[] cbuf, int off, int len) Read.int
read
(CharBuffer target) Read.boolean
ready()
Ready.void
reset()
Reset.long
skip
(long n) Skip.toString()
To string.Methods inherited from class java.io.Reader
nullReader, transferTo
-
Constructor Details
-
FileInputStreamReader
Instantiates a new file input stream reader.- Parameters:
file
- the fileencoding
- the encoding- Throws:
FileNotFoundException
- the file not found exception
-
-
Method Details
-
hashCode
-
read
Read.- Specified by:
read
in interfaceReadable
- Overrides:
read
in classReader
- Parameters:
target
- the target- Returns:
- the int
- Throws:
IOException
- Signals that an I/O exception has occurred.- See Also:
-
read
Read.- Overrides:
read
in classReader
- Returns:
- the int
- Throws:
IOException
- Signals that an I/O exception has occurred.- See Also:
-
equals
-
read
Read.- Overrides:
read
in classReader
- Parameters:
cbuf
- the cbuf- Returns:
- the int
- Throws:
IOException
- Signals that an I/O exception has occurred.- See Also:
-
read
Read.- Specified by:
read
in classReader
- Parameters:
cbuf
- the cbufoff
- the offlen
- the len- Returns:
- the int
- Throws:
IOException
- Signals that an I/O exception has occurred.- See Also:
-
skip
Skip.- Overrides:
skip
in classReader
- Parameters:
n
- the n- Returns:
- the long
- Throws:
IOException
- Signals that an I/O exception has occurred.- See Also:
-
ready
Ready.- Overrides:
ready
in classReader
- Returns:
- true, if successful
- Throws:
IOException
- Signals that an I/O exception has occurred.- See Also:
-
markSupported
public boolean markSupported()Mark supported.- Overrides:
markSupported
in classReader
- Returns:
- true, if successful
- See Also:
-
mark
Mark.- Overrides:
mark
in classReader
- Parameters:
readAheadLimit
- the read ahead limit- Throws:
IOException
- Signals that an I/O exception has occurred.- See Also:
-
reset
Reset.- Overrides:
reset
in classReader
- Throws:
IOException
- Signals that an I/O exception has occurred.- See Also:
-
close
Close.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classReader
- Throws:
IOException
- Signals that an I/O exception has occurred.- See Also:
-
toString
-