public class InMemoryMojoReaderBackend extends MojoReaderBackend
The backend serves MOJO content from in memory file system.
DEFAULT_BASE_DIR, DEFAULT_PROTO_PIPELINE_FILE_PATH, DEFAULT_PROTO_PIPELINE_FILENAME, DEFAULT_TOML_PIPELINE_FILE_PATH, DEFAULT_TOML_PIPELINE_FILENAME| Constructor and Description |
|---|
InMemoryMojoReaderBackend(java.util.Map<java.lang.String,byte[]> mojoContent) |
InMemoryMojoReaderBackend(java.util.Map<java.lang.String,byte[]> mojoContent,
java.lang.String baseDir) |
InMemoryMojoReaderBackend(java.util.Map<java.lang.String,byte[]> mojoContent,
java.lang.String baseDir,
java.lang.String separator) |
InMemoryMojoReaderBackend(java.util.Map<java.lang.String,byte[]> mojoContent,
java.lang.String baseDir,
java.lang.String separator,
java.lang.String pipelineFileName) |
| 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.lang.String[] |
getDirectoryNames(java.lang.String path)
Retrieve a list of all directory names located in
path, relative to the base directory |
java.io.InputStream |
getFile(java.lang.String filename)
Retrieve content inside the mojo, as a
InputStream. |
java.lang.String[] |
getFileNames(java.lang.String path)
Retrieve a list of all file names located in
path, relative to the base directory |
java.io.BufferedReader |
getTextFile(java.lang.String filename)
Retrieve text content inside the mojo, as a
BufferedReader. |
getBaseDir, getPipelineFile, getPipelineFileName, getSeparatorpublic InMemoryMojoReaderBackend(java.util.Map<java.lang.String,byte[]> mojoContent)
public InMemoryMojoReaderBackend(java.util.Map<java.lang.String,byte[]> mojoContent,
java.lang.String baseDir)
public InMemoryMojoReaderBackend(java.util.Map<java.lang.String,byte[]> mojoContent,
java.lang.String baseDir,
java.lang.String separator)
public InMemoryMojoReaderBackend(java.util.Map<java.lang.String,byte[]> mojoContent,
java.lang.String baseDir,
java.lang.String separator,
java.lang.String pipelineFileName)
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)
MojoReaderBackendRetrieve binary content inside the mojo, as a byte[] array.
getBinaryFile in class MojoReaderBackendpublic java.lang.String[] getFileNames(java.lang.String path)
MojoReaderBackendRetrieve a list of all file names located in path, relative to the base directory
getFileNames in class MojoReaderBackendpublic java.lang.String[] getDirectoryNames(java.lang.String path)
MojoReaderBackendRetrieve a list of all directory names located in path, relative to the base directory
getDirectoryNames in class MojoReaderBackendpublic boolean exists(java.lang.String filename)
exists in class MojoReaderBackendpublic void close()