public class TldResourcePath
extends java.lang.Object
This encapsulates references to Tag Library Descriptors that can be located in different places:
META-INF/taglib.tld
. Such a mapping must be explicitly converted
to a URL and entryName when using this implementation.Constructor and Description |
---|
TldResourcePath(java.net.URL url,
java.lang.String webappPath)
Constructor identifying a TLD resource directly.
|
TldResourcePath(java.net.URL url,
java.lang.String webappPath,
java.lang.String entryName)
Constructor identifying a TLD packaged within a JAR file.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getEntryName()
Returns the name of the JAR entry that contains the TLD.
|
Jar |
getJar()
Deprecated.
Renamed, as it is not just a getter method. Use
openJar() . |
java.net.URL |
getUrl()
Returns the URL of the TLD or of the JAR containing the TLD.
|
java.lang.String |
getWebappPath()
Returns the path within the web application, if any, that the resource
returned by
getUrl() was obtained from. |
int |
hashCode() |
Jar |
openJar() |
java.io.InputStream |
openStream()
Opens a stream to access the TLD.
|
java.lang.String |
toExternalForm()
Return the external form of the URL representing this TLD.
|
public TldResourcePath(java.net.URL url, java.lang.String webappPath)
url
- the location of the TLDwebappPath
- the web application path, if any, of the TLDpublic TldResourcePath(java.net.URL url, java.lang.String webappPath, java.lang.String entryName)
url
- the location of the JARwebappPath
- the web application path, if any, of the JARentryName
- the name of the entry in the JARpublic java.net.URL getUrl()
public java.lang.String getWebappPath()
getUrl()
was obtained from.public java.lang.String getEntryName()
public java.lang.String toExternalForm()
public java.io.InputStream openStream() throws java.io.IOException
java.io.IOException
- if there was a problem opening the stream@Deprecated public Jar getJar() throws java.io.IOException
openJar()
.java.io.IOException
public Jar openJar() throws java.io.IOException
java.io.IOException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.