Package org.jruby.util
Class JarCache.JarIndex
java.lang.Object
org.jruby.util.JarCache.JarIndex
- Enclosing class:
- JarCache
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringcanonicalJarPath(String path) String[]getDirEntries(String entryPath) getInputStream(JarEntry entry) getJarEntry(String entryPath) private longgetLastModified(String jarPath) Determines the last modification timestamp of a file.booleanisValid()voidrelease()
-
Field Details
-
ROOT_KEY
- See Also:
-
cachedDirEntries
-
jar
-
lastModified
private final long lastModified -
lastModifiedExpiration
-
-
Constructor Details
-
JarIndex
JarIndex(String jarPath) throws IOException - Throws:
IOException
-
-
Method Details
-
getLastModified
Determines the last modification timestamp of a file.NOTE: Getting the value is an expensive operation on Windows systems (see {@link <a href="https://github.com/jruby/jruby/issues/6730}"). Therefore a cached value is used with a maximum lifetime of
JarCache.LAST_MODIFIED_EXPIRATION_TIME_MILLISECONDSmilliseconds.- Parameters:
jarPath- The path to the JAR file.- Returns:
- The last modification timestamp.
-
getJarEntry
-
getDirEntries
-
getInputStream
- Throws:
IOExceptionIllegalStateException
-
release
public void release() -
isValid
public boolean isValid() -
canonicalJarPath
-