public class InMemoryFileIO extends java.lang.Object implements FileIO
| Constructor and Description |
|---|
InMemoryFileIO() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFile(java.lang.String location,
byte[] contents) |
void |
close()
Close File IO to release underlying resources.
|
void |
deleteFile(java.lang.String location)
Delete the file at the given path.
|
boolean |
fileExists(java.lang.String location) |
boolean |
isClosed() |
InputFile |
newInputFile(java.lang.String location)
Get a
InputFile instance to read bytes from the file at the given path. |
OutputFile |
newOutputFile(java.lang.String location)
Get a
OutputFile instance to write bytes to the file at the given path. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeleteFile, deleteFile, initialize, newInputFile, newInputFile, newInputFile, newInputFile, propertiespublic void addFile(java.lang.String location,
byte[] contents)
public boolean fileExists(java.lang.String location)
public InputFile newInputFile(java.lang.String location)
FileIOInputFile instance to read bytes from the file at the given path.newInputFile in interface FileIOpublic OutputFile newOutputFile(java.lang.String location)
FileIOOutputFile instance to write bytes to the file at the given path.newOutputFile in interface FileIOpublic void deleteFile(java.lang.String location)
FileIOdeleteFile in interface FileIOpublic boolean isClosed()
public void close()
FileIOCalling this method is only required when this FileIO instance is no longer expected to be used, and the resources it holds need to be explicitly released to avoid resource leaks.