|
TV-Browser 2.7.5 API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectutil.io.Mirror
public class Mirror
| Field Summary | |
|---|---|
static int |
DEFAULT_WEIGHT
The default weight of a mirror |
static String |
MIRROR_LIST_FILE_NAME
The name extension of mirror files |
static Localizer |
mLocalizer
The localizer for this class. |
| Constructor Summary | |
|---|---|
Mirror(String url)
Creates an instance with the given URL and the default weight for this mirror. |
|
Mirror(String url,
int weight)
|
|
| Method Summary | |
|---|---|
static Mirror |
chooseUpToDateMirror(Mirror[] mirrorArr,
ProgressMonitor monitor,
String name,
String id,
Class caller,
String additionalErrorMsg)
Chooses a up to date mirror. |
boolean |
equals(Object obj)
|
String |
getUrl()
Gets the URL of this Mirror. |
int |
getWeight()
Gets the weight of this Mirror. |
int |
hashCode()
|
static Mirror[] |
loadMirrorList(File file,
String[] mirrorUrlArr,
Mirror[] serverDefindedMirros)
Loads the mirror lists from the given file and the given server defined mirror array. |
static Mirror[] |
readMirrorListFromFile(File file)
Reads the mirrors in the given file. |
static void |
resetBannedServers()
Reset the List of banned Servers |
void |
setWeight(int weight)
Sets the weight of this Mirror. |
static void |
writeMirrorListToFile(File file,
Mirror[] mirrorArr)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Localizer mLocalizer
public static final String MIRROR_LIST_FILE_NAME
public static final int DEFAULT_WEIGHT
| Constructor Detail |
|---|
public Mirror(String url,
int weight)
url - weight - public Mirror(String url)
url - The URL of the mirror.| Method Detail |
|---|
public String getUrl()
public int getWeight()
public void setWeight(int weight)
weight - The new weight of this Mirror.
public static Mirror[] readMirrorListFromFile(File file)
throws IOException,
FileFormatException
file - The file to read the mirros from.
IOException - Thrown if something went wrong.
FileFormatException - Thrown if something went wrong.
public static void writeMirrorListToFile(File file,
Mirror[] mirrorArr)
throws IOException
file - The file to write the mirror array to.mirrorArr - The mirror array to write.
IOException - Thrown if something went wrong.public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
public static Mirror[] loadMirrorList(File file,
String[] mirrorUrlArr,
Mirror[] serverDefindedMirros)
file - The file to load the mirrors from.mirrorUrlArr - The array with the current mirrors urls.serverDefindedMirros - The array with the server definded mirrors
public static Mirror chooseUpToDateMirror(Mirror[] mirrorArr,
ProgressMonitor monitor,
String name,
String id,
Class caller,
String additionalErrorMsg)
throws TvBrowserException
mirrorArr - The mirror array to check.monitor - The progress monitor to use.name - The name of the file to check.id - The id of the file to check.caller - The caller class.additionalErrorMsg - An additonal error message value.
TvBrowserException - Thrown if no up to date mirror was found or something went wrong.public static void resetBannedServers()
|
TV-Browser 2.7.5 API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||