|
|||||||||
| Home >> All >> org >> vrspace >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.vrspace.util
Class NetResource

java.lang.Objectorg.vrspace.util.NetResource
- public class NetResource
- extends java.lang.Object
This class represents a network resource - a collection of URLs pointing to same file.
| Field Summary | |
java.util.Vector |
urls
|
| Constructor Summary | |
NetResource()
|
|
NetResource(java.lang.String urlSpec)
This constructor creates NetResource with specified urls. |
|
| Method Summary | |
void |
addURL(java.lang.String urlSpec)
Adds url to the list. |
java.net.URL |
getURL()
Returns prefered URL of this resource. |
static void |
main(java.lang.String[] args)
|
java.lang.String[] |
toArray()
Returns urls as string array |
java.lang.String |
toSpecString()
Returns string in format [ url1,url2,...urlN ] |
java.lang.String |
toString()
Returns url list delimited by space |
void |
update()
Updates this resource info. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
urls
public java.util.Vector urls
| Constructor Detail |
NetResource
public NetResource()
NetResource
public NetResource(java.lang.String urlSpec)
- This constructor creates NetResource with specified urls.
| Method Detail |
toString
public java.lang.String toString()
- Returns url list delimited by space
toArray
public java.lang.String[] toArray()
- Returns urls as string array
toSpecString
public java.lang.String toSpecString()
- Returns string in format [ url1,url2,...urlN ]
getURL
public java.net.URL getURL()
- Returns prefered URL of this resource. Checks whether URL is available by opening a connection.
addURL
public void addURL(java.lang.String urlSpec) throws java.io.IOException
- Adds url to the list. Checks whether URL is accessible.
update
public void update()
- Updates this resource info. Opens connections to each url in list and checks for availability.
Ensures that all urls are available.
main
public static void main(java.lang.String[] args) throws java.lang.Exception
|
|||||||||
| Home >> All >> org >> vrspace >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.vrspace.util.NetResource