public class FolderMojoReaderBackend extends MojoReaderBackend
The backend serves MOJO content from a folder.
DEFAULT_BASE_DIR, DEFAULT_PROTO_PIPELINE_FILE_PATH, DEFAULT_PROTO_PIPELINE_FILENAME, DEFAULT_TOML_PIPELINE_FILE_PATH, DEFAULT_TOML_PIPELINE_FILENAME| Constructor and Description |
|---|
FolderMojoReaderBackend(java.lang.String folder) |
FolderMojoReaderBackend(java.lang.String folder,
java.lang.String pipelineFile) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
exists(java.lang.String filename) |
byte[] |
getBinaryFile(java.lang.String filename)
Retrieve binary content inside the mojo, as a
byte[] array. |
java.io.InputStream |
getFile(java.lang.String filename)
Retrieve content inside the mojo, as a
InputStream. |
java.io.BufferedReader |
getTextFile(java.lang.String filename)
Retrieve text content inside the mojo, as a
BufferedReader. |
getBaseDir, getPipelineFile, getPipelineFileName, getSeparatorpublic FolderMojoReaderBackend(java.lang.String folder)
public FolderMojoReaderBackend(java.lang.String folder,
java.lang.String pipelineFile)
public java.io.InputStream getFile(java.lang.String filename)
throws java.io.IOException
MojoReaderBackendRetrieve content inside the mojo, as a InputStream.
getFile in class MojoReaderBackendjava.io.IOExceptionpublic java.io.BufferedReader getTextFile(java.lang.String filename)
throws java.io.IOException
MojoReaderBackendRetrieve text content inside the mojo, as a BufferedReader.
getTextFile in class MojoReaderBackendjava.io.IOExceptionpublic byte[] getBinaryFile(java.lang.String filename)
throws java.io.IOException
MojoReaderBackendRetrieve binary content inside the mojo, as a byte[] array.
getBinaryFile in class MojoReaderBackendjava.io.IOExceptionpublic boolean exists(java.lang.String filename)
exists in class MojoReaderBackendpublic void close()