|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--anthill.types.URLResourceImpl
Constructor Summary | |
URLResourceImpl()
Default constructor for externalization. |
|
URLResourceImpl(String url,
DocumentId id)
Constructs a new URLResourceImpl identified by the
specified stringified URL and by the given document ID. |
|
URLResourceImpl(URL url,
DocumentId id)
Constructs a new URLResourceImpl identified by the
specified URL . |
Method Summary | |
boolean |
equals(Object obj)
Check whether this URLResourceImpl is equal to the specified object. |
String |
getAttribute(String name)
Returns the value associated to the specified attribute name, or null if there is no attribute with that name. |
long |
getContentLength()
Returns the lenght of the content of the resource, if available. |
String |
getFile(String url)
Returns the file part of this URL. |
InputStream |
getInputStream()
Return an input stream to download the contents of the resource. |
Object |
getKey()
Returns the document key for this Url resource as the key. |
String |
getName()
Returns the string identifier of the object. |
String |
getURL()
Returns the stringified url for this Url resource. |
int |
hashCode()
Returns a hash code value for the object. |
void |
readExternal(ObjectInput in)
Marshals this URLResourceImpl to the specified output stream. |
long |
size()
Returns the space needed to store the resource, if available. |
String |
toString()
Returns a string representation of the object. |
void |
writeExternal(ObjectOutput out)
Marshals this URLResourceImpl to the specified output stream. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public URLResourceImpl()
public URLResourceImpl(URL url, DocumentId id) throws IOException
URLResourceImpl
identified by the
specified URL
.
url
- url from which the resource may be downloadedid
- the document identifier associated to this resourcepublic URLResourceImpl(String url, DocumentId id)
URLResourceImpl
identified by the
specified stringified URL and by the given document ID.
url
- url from which the resource may be downloadedid
- the document identifier associated to this resourceMethod Detail |
public String getName()
getName
in interface Resource
public String getAttribute(String name)
getAttribute
in interface Resource
name
- the name of the attributepublic InputStream getInputStream() throws IOException
getInputStream
in interface Resource
IOException
public long getContentLength()
getContentLength
in interface Resource
public long size()
size
in interface Resource
public Object getKey()
getKey
in interface Resource
public String getURL()
public String getFile(String url)
public boolean equals(Object obj)
URLResourceImpl
is equal to the specified object.
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
URLResourceImpl
to the specified output stream.
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
URLResourceImpl
to the specified output stream.
writeExternal
in interface Externalizable
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |