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:
FileReader fileReader = new FileReader() {
@Override
public InputStream read() {
// Create document stream
}
@Override
public void close() {
// Close the stream
}
};
try (Viewer viewer = new Viewer(fileReader, new ViewerSettings())){
// Process document
}