|
33 | 33 | package electrostatic4j.snaploader.library; |
34 | 34 |
|
35 | 35 | import java.io.IOException; |
| 36 | +import java.util.zip.ZipFile; |
36 | 37 | import electrostatic4j.snaploader.filesystem.ConcurrentFileExtractor; |
37 | 38 | import electrostatic4j.snaploader.filesystem.FileExtractor; |
38 | 39 |
|
|
44 | 45 | public class LibraryExtractor extends ConcurrentFileExtractor { |
45 | 46 |
|
46 | 47 | /** |
47 | | - * Instantiates a native dynamic library extractor with a jar path, library path and extract destination filesystem path. |
| 48 | + * Instantiates a native dynamic library extractor for an external compression file locator routine. |
48 | 49 | * |
49 | | - * @param jarPath an absolute path to the jar filesystem containing the library |
50 | | - * @param libraryPath the path of the library inside the jar filesystem |
| 50 | + * @param compression the zip file object for external locator routines |
| 51 | + * @param libraryPath the path of the library inside the compression filesystem |
51 | 52 | * @param destination the extraction destination filesystem path |
52 | 53 | * @throws IOException if the jar filesystem to be located is not found, or if the extraction destination is not found |
53 | 54 | */ |
54 | | - public LibraryExtractor(String jarPath, String libraryPath, String destination) throws IOException { |
55 | | - super(new LibraryLocator(jarPath, libraryPath), destination); |
| 55 | + public LibraryExtractor(ZipFile compression, String libraryPath, String destination) throws IOException { |
| 56 | + super(new LibraryLocator(compression, libraryPath), destination); |
56 | 57 | } |
57 | 58 |
|
58 | 59 | /** |
59 | 60 | * Instantiates a native dynamic library extractor with a library path and an extract destination filesystem path. This |
60 | | - * object locates a dynamic native library inside the stock jar filesystem based on a classpath input stream. |
| 61 | + * object locates a dynamic native library inside the stock jar filesystem based on a classpath input stream |
| 62 | + * (i.e., classpath file locator routine). |
61 | 63 | * |
62 | 64 | * @param libraryPath the path of the library inside the jar filesystem |
63 | 65 | * @param destination the extraction destination filesystem path |
64 | | - * @throws IOException if the jar filesystem to be located is not found, or if the extraction destination is not found |
65 | 66 | */ |
66 | | - public LibraryExtractor(String libraryPath, String destination) throws IOException { |
| 67 | + public LibraryExtractor(String libraryPath, String destination) { |
67 | 68 | super(new LibraryLocator(libraryPath), destination); |
68 | 69 | } |
69 | 70 | } |
0 commit comments