public final class NarUnpacker extends Object
| Modifier and Type | Field and Description |
|---|---|
private static String |
HASH_FILENAME |
private static org.slf4j.Logger |
logger |
private static FileFilter |
NAR_FILTER |
| Modifier | Constructor and Description |
|---|---|
private |
NarUnpacker() |
| Modifier and Type | Method and Description |
|---|---|
private static byte[] |
calculateMd5sum(File file)
Calculates an md5 sum of the specified file.
|
private static void |
determineDocumentedNiFiComponents(File jar,
ExtensionMapping extensionMapping) |
private static List<String> |
determineDocumentedNiFiComponents(JarFile jarFile,
JarEntry jarEntry) |
private static void |
makeFile(InputStream inputStream,
File file)
Creates the specified file, whose contents will come from the
InputStream.
|
private static void |
mapExtensions(File workingDirectory,
File docsDirectory,
ExtensionMapping mapping) |
private static void |
unpack(File nar,
File workingDirectory,
byte[] hash)
Unpacks the NAR to the specified directory.
|
private static void |
unpackDocumentation(File jar,
File docsDirectory,
ExtensionMapping extensionMapping) |
private static File |
unpackNar(File nar,
File baseWorkingDirectory)
Unpacks the specified nar into the specified base working directory.
|
static ExtensionMapping |
unpackNars(NiFiProperties props) |
private static final org.slf4j.Logger logger
private static String HASH_FILENAME
private static final FileFilter NAR_FILTER
public static ExtensionMapping unpackNars(NiFiProperties props)
private static void mapExtensions(File workingDirectory, File docsDirectory, ExtensionMapping mapping) throws IOException
IOExceptionprivate static File unpackNar(File nar, File baseWorkingDirectory) throws IOException
nar - the nar to unpackbaseWorkingDirectory - the directory to unpack toIOException - if unable to explode narprivate static void unpack(File nar, File workingDirectory, byte[] hash) throws IOException
workingDirectory - the root directory to which the NAR should be unpacked.IOException - if the NAR could not be unpacked.private static void unpackDocumentation(File jar, File docsDirectory, ExtensionMapping extensionMapping) throws IOException
IOExceptionprivate static void determineDocumentedNiFiComponents(File jar, ExtensionMapping extensionMapping) throws IOException
IOExceptionprivate static List<String> determineDocumentedNiFiComponents(JarFile jarFile, JarEntry jarEntry) throws IOException
IOExceptionprivate static void makeFile(InputStream inputStream, File file) throws IOException
inputStream - the contents of the file to create.file - the file to create.IOException - if the file could not be created.private static byte[] calculateMd5sum(File file) throws IOException
file - to calculate the md5sum ofIOException - if cannot read fileCopyright © 2016 Apache NiFi Project. All rights reserved.