public class URLContent extends java.lang.Object implements Content
| Constructor and Description |
|---|
URLContent(java.net.URL url) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Returns
true if the object in parameter is an URL content
that references the same URL as this object. |
java.lang.String |
getJAREntryName()
Returns the name of a JAR entry.
|
java.net.URL |
getJAREntryURL()
Returns the URL base of a JAR entry.
|
long |
getSize()
Returns the size of this content.
|
java.net.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. |
java.io.InputStream |
openStream()
Returns an InputStream on the URL content.
|
public java.net.URL getURL()
public java.io.InputStream openStream()
throws java.io.IOException
openStream in interface Contentjava.io.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 java.net.URL getJAREntryURL()
java.lang.IllegalStateException - if the URL of this content
doesn't reference an entry in a JAR.public java.lang.String getJAREntryName()
java.lang.IllegalStateException - if the URL of this content
doesn't reference an entry in a JAR URL.public long getSize()
public boolean equals(java.lang.Object obj)
true if the object in parameter is an URL content
that references the same URL as this object.equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object

© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License