package com.github.gtache.autosubtitle; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; /** * Represents a file */ @FunctionalInterface public interface File { /** * @return The file input stream * @throws IOException If an I/O error occurs */ default InputStream getInputStream() throws IOException { return Files.newInputStream(path()); } /** * @return The file path */ Path path(); }