| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | NestedJarHandler.
Wrapper class that allows an |
| Modifier and Type | Field and Description |
|---|---|
| private SingletonMap | canonicalFileToPhysicalZipFileMap
A singleton map from a zipfile's |
| private final AtomicBoolean | closed
True if |
| private static final int | DEFAULT_BUFFER_SIZE
The default size of a file buffer. |
| private SingletonMap | fastZipEntryToZipFileSliceMap
A singleton map from a |
| private static final int | HTTP_TIMEOUT
HTTP(S) timeout, ms. |
| private Recycler | inflaterRecycler
A recycler for |
| public InterruptionChecker | interruptionChecker
The interruption checker. |
| private static final int | MAX_INITIAL_BUFFER_SIZE
The maximum initial buffer size. |
| public SingletonMap | moduleRefToModuleReaderProxyRecyclerMap
A singleton map from a |
| public SingletonMap | nestedPathToLogicalZipFileAndPackageRootMap
A singleton map from nested jarfile path to a tuple of the logical zipfile for the path, and the package root within the logical zipfile. |
| private Set | openSlices
|
| public ReflectionUtils | |
| private static Method | runFinalizationMethod
System.runFinalization() -- deprecated in JDK 18, so accessed by reflection. |
| public final ScanSpec | |
| public static final String | TEMP_FILENAME_LEAF_SEPARATOR
The separator between random temp filename part and leafname. |
| private Set | tempFiles
Any temporary files created while scanning. |
| private SingletonMap | zipFileSliceToLogicalZipFileMap
A singleton map from a |
| Access | Constructor and Description |
|---|---|
| public | NestedJarHandler(final ScanSpec
The scanSpec, final InterruptionChecker ScanSpec.the interruption checker interruptionChecker, final ReflectionUtils reflectionUtils)A handler for nested jars. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| private PhysicalZipFile | Returns: the temporary file orByteBuffer the jar was downloaded to, wrapped in a
PhysicalZipFile instance.the jar URL jarURL, final LogNode the log log)Download a jar from a URL to a temporary file, or to a ByteBuffer if the temporary directory is not writeable or full. |
| private static String | |
| public File | Returns: The temporaryFile.The path to derive the temporary filename from. filePathBase, final boolean If true, only use the leafname of filePath to derive the temporary filename. onlyUseLeafname)Create a temporary file, and mark it for deletion on exit. |
| public void | |
| public void | markSliceAsOpen(final Slice
the slice)Slice that was just opened.Mark a |
| public InputStream | Returns: the inflater input streamthe raw input stream rawInputStream)Wrap an |
| public static byte[] | Returns: The contents of theInputStream as a byte array.The inputStream, final long InputStream.The length of the data once inflated from the uncompressedLengthHint)InputStream, if known, otherwise -1L.Read all the bytes in an |
| public Slice | Returns: if theInputStream could be read into a byte array, an ArraySlice will be returned.
If this fails and the InputStream is spilled over to disk, a FileSlice will be
returned.the inputStream, final String InputStream to read from.the source URL or zip entry that inputStream was opened from (used to name temporary file, if
needed). tempFileBaseName, final long the length of inputStream if known, else -1L. inputStreamLengthHint, final LogNode the log. log)Read all the bytes in an |
| pack-priv void | |
| public void | |
| private String | Returns: the sanitized filenamethe filename filename)Sanitize filename. |
| private FileSlice | Returns: the file sliceThe inputStream, final String InputStream.The stem to base the temporary filename on. tempFileBaseName, final byte[] The first buffer to write to the beginning of the file, or null if none. buf, final byte[] The second buffer to write to the beginning of the file, or null if none. (Should have same
nullity as buf.) overflowBuf, final LogNode The log. log)Spill an |
| canonicalFileToPhysicalZipFileMap | back to summary |
|---|---|
| private SingletonMap<File, PhysicalZipFile, IOException> canonicalFileToPhysicalZipFileMap A singleton map from a zipfile's | |
| closed | back to summary |
|---|---|
| private final AtomicBoolean closed True if | |
| DEFAULT_BUFFER_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_BUFFER_SIZE The default size of a file buffer. | |
| fastZipEntryToZipFileSliceMap | back to summary |
|---|---|
| private SingletonMap<FastZipEntry, ZipFileSlice, IOException> fastZipEntryToZipFileSliceMap A singleton map from a | |
| HTTP_TIMEOUT | back to summary |
|---|---|
| private static final int HTTP_TIMEOUT HTTP(S) timeout, ms. | |
| inflaterRecycler | back to summary |
|---|---|
| private Recycler<NestedJarHandler. A recycler for | |
| interruptionChecker | back to summary |
|---|---|
| public InterruptionChecker interruptionChecker The interruption checker. | |
| MAX_INITIAL_BUFFER_SIZE | back to summary |
|---|---|
| private static final int MAX_INITIAL_BUFFER_SIZE The maximum initial buffer size. | |
| moduleRefToModuleReaderProxyRecyclerMap | back to summary |
|---|---|
| public SingletonMap<ModuleRef, Recycler<ModuleReaderProxy, IOException>, IOException> moduleRefToModuleReaderProxyRecyclerMap A singleton map from a | |
| nestedPathToLogicalZipFileAndPackageRootMap | back to summary |
|---|---|
| public SingletonMap<String, Map. A singleton map from nested jarfile path to a tuple of the logical zipfile for the path, and the package root within the logical zipfile. | |
| openSlices | back to summary |
|---|---|
| private Set<Slice> openSlices
| |
| reflectionUtils | back to summary |
|---|---|
| public ReflectionUtils reflectionUtils | |
| runFinalizationMethod | back to summary |
|---|---|
| private static Method runFinalizationMethod System.runFinalization() -- deprecated in JDK 18, so accessed by reflection. | |
| scanSpec | back to summary |
|---|---|
| public final ScanSpec scanSpec The | |
| TEMP_FILENAME_LEAF_SEPARATOR | back to summary |
|---|---|
| public static final String TEMP_FILENAME_LEAF_SEPARATOR The separator between random temp filename part and leafname. | |
| tempFiles | back to summary |
|---|---|
| private Set<File> tempFiles Any temporary files created while scanning. | |
| zipFileSliceToLogicalZipFileMap | back to summary |
|---|---|
| private SingletonMap<ZipFileSlice, LogicalZipFile, IOException> zipFileSliceToLogicalZipFileMap A singleton map from a | |
| NestedJarHandler | back to summary |
|---|---|
| public NestedJarHandler(final ScanSpec scanSpec, final InterruptionChecker interruptionChecker, final ReflectionUtils reflectionUtils) A handler for nested jars.
| |
| close | back to summary |
|---|---|
| public void close(final LogNode log) Close zipfiles, modules, and recyclers, and delete temporary files. Called by
| |
| closeDirectByteBuffer | back to summary |
|---|---|
| public void closeDirectByteBuffer(final ByteBuffer backingByteBuffer) | |
| downloadJarFromURL | back to summary |
|---|---|
| private PhysicalZipFile downloadJarFromURL(final String jarURL, final LogNode log) throws IOException, InterruptedException Download a jar from a URL to a temporary file, or to a ByteBuffer if the temporary directory is not writeable
or full. The downloaded jar is returned wrapped in a
| |
| leafname | back to summary |
|---|---|
| private static String leafname(final String path) Get the leafname of a path. | |
| makeTempFile | back to summary |
|---|---|
| public File makeTempFile(final String filePathBase, final boolean onlyUseLeafname) throws IOException Create a temporary file, and mark it for deletion on exit.
| |
| markSliceAsClosed | back to summary |
|---|---|
| public void markSliceAsClosed(final Slice slice) Mark a | |
| markSliceAsOpen | back to summary |
|---|---|
| public void markSliceAsOpen(final Slice slice) throws IOException Mark a
| |
| openInflaterInputStream | back to summary |
|---|---|
| public InputStream openInflaterInputStream(final InputStream rawInputStream) throws IOException Wrap an
| |
| readAllBytesAsArray | back to summary |
|---|---|
| public static byte[] readAllBytesAsArray(final InputStream inputStream, final long uncompressedLengthHint) throws IOException Read all the bytes in an
| |
| readAllBytesWithSpilloverToDisk | back to summary |
|---|---|
| public Slice readAllBytesWithSpilloverToDisk(final InputStream inputStream, final String tempFileBaseName, final long inputStreamLengthHint, final LogNode log) throws IOException Read all the bytes in an
| |
| removeTempFile | back to summary |
|---|---|
| pack-priv void removeTempFile(final File tempFile) throws IOException, SecurityException Attempt to remove a temporary file.
| |
| runFinalizationMethod | back to summary |
|---|---|
| public void runFinalizationMethod() | |
| sanitizeFilename | back to summary |
|---|---|
| private String sanitizeFilename(final String filename) Sanitize filename. | |
| spillToDisk | back to summary |
|---|---|
| private FileSlice spillToDisk(final InputStream inputStream, final String tempFileBaseName, final byte[] buf, final byte[] overflowBuf, final LogNode log) throws IOException Spill an
| |
| Modifier and Type | Field and Description |
|---|---|
| public final URLConnection | |
| public final HttpURLConnection |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements java. Closes this resource, relinquishing any underlying resources. |
| conn | back to summary |
|---|---|
| public final URLConnection conn | |
| httpConn | back to summary |
|---|---|
| public final HttpURLConnection httpConn | |
| CloseableUrlConnection | back to summary |
|---|---|
| public CloseableUrlConnection(final URL url) throws IOException | |
| close | back to summary |
|---|---|
| public void close() Implements java. Doc from java. Closes this resource, relinquishing any underlying resources.
This method is invoked automatically on objects managed by the
| |
Inflater instance to be reset for reuse and then recycled by a
Recycler.
| Modifier and Type | Field and Description |
|---|---|
| private final Inflater |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements java. Called when the |
| public Inflater | |
| public void | reset()
Implements nonapi. Called when an |
| inflater | back to summary |
|---|---|
| private final Inflater inflater Create a new | |
| RecyclableInflater | back to summary |
|---|---|
| private RecyclableInflater() | |
| close | back to summary |
|---|---|
| public void close() Implements java. Called when the
| |
| getInflater | back to summary |
|---|---|
| public Inflater getInflater() Get the | |
| reset | back to summary |
|---|---|
| public void reset() Implements nonapi. Called when an
| |