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 TypeMethodDescriptionvoidclose()Close.booleanEquals.inthashCode()Hash code.voidmark(int readAheadLimit) Mark.booleanMark supported.intread()Read.intread(char[] cbuf) Read.intread(char[] cbuf, int off, int len) Read.intread(CharBuffer target) Read.booleanready()Ready.voidreset()Reset.longskip(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:
readin interfaceReadable- Overrides:
readin classReader- Parameters:
target- the target- Returns:
- the int
- Throws:
IOException- Signals that an I/O exception has occurred.- See Also:
-
read
Read.- Overrides:
readin classReader- Returns:
- the int
- Throws:
IOException- Signals that an I/O exception has occurred.- See Also:
-
equals
-
read
Read.- Overrides:
readin classReader- Parameters:
cbuf- the cbuf- Returns:
- the int
- Throws:
IOException- Signals that an I/O exception has occurred.- See Also:
-
read
Read.- Specified by:
readin 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:
skipin classReader- Parameters:
n- the n- Returns:
- the long
- Throws:
IOException- Signals that an I/O exception has occurred.- See Also:
-
ready
Ready.- Overrides:
readyin classReader- Returns:
- true, if successful
- Throws:
IOException- Signals that an I/O exception has occurred.- See Also:
-
markSupported
public boolean markSupported()Mark supported.- Overrides:
markSupportedin classReader- Returns:
- true, if successful
- See Also:
-
mark
Mark.- Overrides:
markin classReader- Parameters:
readAheadLimit- the read ahead limit- Throws:
IOException- Signals that an I/O exception has occurred.- See Also:
-
reset
Reset.- Overrides:
resetin classReader- Throws:
IOException- Signals that an I/O exception has occurred.- See Also:
-
close
Close.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException- Signals that an I/O exception has occurred.- See Also:
-
toString
-