public class InMemoryMojoReaderBackend extends MojoReaderBackend
The backend serves MOJO content from in memory file system.
| 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.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 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 boolean exists(java.lang.String filename)
exists in class MojoReaderBackendpublic void close()