Adds tests for API
This commit is contained in:
@@ -5,10 +5,20 @@ import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
/**
|
||||
* Represents a file
|
||||
*/
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user