public interface FileReader extends Closeable
The FileReader interface provides a method for reading a file stream. It is used for accessing and reading the contents of a file in a sequential manner. Implementations of this interface should handle the necessary operations to read data from a file.
Example usage:
{@code
FileReader fileReader = new FileReader() {Viewer,
ViewerSettings| Modifier and Type | Method and Description |
|---|---|
void |
close()
Disposes the object and releases any system resources associated with it.
|
InputStream |
read()
Returns an
InputStream that represents a readable stream for the file. |
void close()
Disposes the object and releases any system resources associated with it.
close in interface AutoCloseableclose in interface CloseableInputStream read() throws FileNotFoundException
Returns an InputStream that represents a readable stream for the file.
InputStream readable stream.FileNotFoundException - If the file is not found.Copyright © 2025. All rights reserved.