|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwol.configuration.Configuration
This class represents a WakeOnLan configuration.
Constructor Summary | |
Configuration()
|
|
Configuration(File file)
Creates a new configuration with the given file. |
|
Configuration(String path)
Creates a new configuration with the given path. |
Method Summary | |
File |
getFile()
Returns the file for this configuration. |
Machine[] |
getMachines()
Returns the machines. |
void |
loadConfig()
Loads this configuration from the file returned by getFile() . |
void |
saveConfig()
Saves this configuration to the file returned by getFile() .
|
void |
saveConfigAs(File file)
Saves this configuration to the given file. |
void |
setMachines(Machine[] machines)
Sets the machines. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Configuration()
public Configuration(String path)
path
- a path that denotes a file the configuration will be saved topublic Configuration(File file)
file
- a file this configuration will be saved toloadConfig()
Method Detail |
public Machine[] getMachines()
public void setMachines(Machine[] machines)
machines
- the machinespublic void loadConfig() throws FileNotFoundException
getFile()
.
FileNotFoundException
- if the file does not exist.getFile()
public void saveConfig() throws FileNotFoundException
getFile()
.
This is equal to saveConfig(getFile()).
FileNotFoundException
- if the file exists but is a directory
rather than a regular file, does not exist but cannot
be created, or cannot be opened for any other reasongetFile()
,
saveConfigAs(File)
public void saveConfigAs(File file) throws FileNotFoundException
file
- the file
FileNotFoundException
- if the file exists but is a directory
rather than a regular file, does not exist but cannot
be created, or cannot be opened for any other reasonsaveConfigAs(File)
public File getFile()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |