public class FolderSupplier extends java.lang.Object implements InputSupplier, OutputSupplier
| Constructor and Description |
|---|
FolderSupplier(java.io.File root) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
java.util.List<java.lang.String> |
gatherAll(java.lang.String endFilter)
Gathers all the names of all the resources with the given ending in their name.
|
java.io.InputStream |
getInput(java.lang.String relPath)
Opens an input stream to the specified resource.
|
java.io.OutputStream |
getOutput(java.lang.String relPath)
Opens an output stream to the specified resource.
|
java.lang.String |
getRoot(java.lang.String resource)
The absolute path of the root entity of the given resource, be it a file or directory.
|
public java.io.OutputStream getOutput(java.lang.String relPath)
OutputSuppliergetOutput in interface OutputSupplierrelPath - Reative path seperated with '/' and having no preceding slash.public java.io.InputStream getInput(java.lang.String relPath)
InputSuppliergetInput in interface InputSupplierrelPath - Reative path seperated with '/' and having no preceding slash.public java.util.List<java.lang.String> gatherAll(java.lang.String endFilter)
InputSuppliergatherAll in interface InputSupplierpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic java.lang.String getRoot(java.lang.String resource)
InputSuppliergetRoot in interface InputSupplier