public class URLContent extends Object implements Content
Constructor and Description |
---|
URLContent(URL url) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Returns
true if the object in parameter is an URL content
that references the same URL as this object. |
String |
getJAREntryName()
Returns the name of a JAR entry.
|
URL |
getJAREntryURL()
Returns the URL base of a JAR entry.
|
URL |
getURL()
Returns the URL of this content.
|
int |
hashCode() |
boolean |
isJAREntry()
Returns
true if the URL stored by this content
references an entry in a JAR. |
InputStream |
openStream()
Returns an InputStream on the URL content.
|
public URLContent(URL url)
public URL getURL()
public InputStream openStream() throws IOException
openStream
in interface Content
IOException
- if URL stream can't be opened.public boolean isJAREntry()
true
if the URL stored by this content
references an entry in a JAR.public URL getJAREntryURL()
IllegalStateException
- if the URL of this content
doesn't reference an entry in a JAR.public String getJAREntryName()
IllegalStateException
- if the URL of this content
doesn't reference an entry in a JAR URL.public boolean equals(Object obj)
true
if the object in parameter is an URL content
that references the same URL as this object.
© Copyrights 2006-2015 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License