public class StandardArchiveDescriptorFactory extends java.lang.Object implements ArchiveDescriptorFactory, JarFileEntryUrlAdjuster
Modifier and Type | Field and Description |
---|---|
static StandardArchiveDescriptorFactory |
INSTANCE
Singleton access
|
Constructor and Description |
---|
StandardArchiveDescriptorFactory() |
Modifier and Type | Method and Description |
---|---|
java.net.URL |
adjustJarFileEntryUrl(java.net.URL url,
java.net.URL rootUrl)
Adjust the given URL, if needed.
|
ArchiveDescriptor |
buildArchiveDescriptor(java.net.URL url)
Build a descriptor of the archive indicated by the given url
|
ArchiveDescriptor |
buildArchiveDescriptor(java.net.URL url,
java.lang.String entry)
Build a descriptor of the archive indicated by the path relative to the given url
|
protected java.lang.String |
extractLocalFilePath(java.net.URL url) |
java.net.URL |
getJarURLFromURLEntry(java.net.URL url,
java.lang.String entry)
Given a URL which defines an entry within a JAR (really any "bundled archive" such as a jar file, zip, etc)
and an entry within that JAR, find the URL to the JAR itself.
|
java.net.URL |
getURLFromPath(java.lang.String jarPath)
Not used!
|
public static final StandardArchiveDescriptorFactory INSTANCE
public ArchiveDescriptor buildArchiveDescriptor(java.net.URL url)
ArchiveDescriptorFactory
buildArchiveDescriptor
in interface ArchiveDescriptorFactory
url
- The url to the archivepublic ArchiveDescriptor buildArchiveDescriptor(java.net.URL url, java.lang.String entry)
ArchiveDescriptorFactory
buildArchiveDescriptor
in interface ArchiveDescriptorFactory
url
- The url to the archiveentry
- The path within the given url that refers to the archiveprotected java.lang.String extractLocalFilePath(java.net.URL url)
public java.net.URL getJarURLFromURLEntry(java.net.URL url, java.lang.String entry) throws java.lang.IllegalArgumentException
ArchiveDescriptorFactory
getJarURLFromURLEntry
in interface ArchiveDescriptorFactory
url
- The URL to an entry within a JARentry
- The entry that described the thing referred to by the URL relative to the JARjava.lang.IllegalArgumentException
- Generally indicates a problem with malformed urls.public java.net.URL getURLFromPath(java.lang.String jarPath)
ArchiveDescriptorFactory
getURLFromPath
in interface ArchiveDescriptorFactory
jarPath
- The jar pathpublic java.net.URL adjustJarFileEntryUrl(java.net.URL url, java.net.URL rootUrl)
JarFileEntryUrlAdjuster
adjustJarFileEntryUrl
in interface JarFileEntryUrlAdjuster
url
- The url to adjustrootUrl
- The root URL, for resolving relative URLsCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.