Class ZonesXMLLoader
java.lang.Object
games.stendhal.server.core.config.ZonesXMLLoader
Load and configure zones via an XML configuration file.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classA zone descriptor. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidload()Load a group of zones into a world.protected StendhalRPZoneload(ZonesXMLLoader.ZoneDesc desc, StendhalMapStructure zonedata) Load zone data and create a new zone from it.protected voidload(InputStream in) Loads a group of zones into a world using a config file.static void
-
Constructor Details
-
ZonesXMLLoader
Create an XML based loader of zones.- Parameters:
uri- the zone group file
-
-
Method Details
-
load
Load a group of zones into a world.- Throws:
SAXException- If a SAX error occurred.IOException- If an I/O error occurred.FileNotFoundException- If the resource was not found.
-
load
Loads a group of zones into a world using a config file.- Parameters:
in- The config file stream.- Throws:
SAXException- If a SAX error occurred.IOException- If an I/O error occurred.
-
load
protected StendhalRPZone load(ZonesXMLLoader.ZoneDesc desc, StendhalMapStructure zonedata) throws SAXException, IOException Load zone data and create a new zone from it. Most of this should be moved directly into ZoneXMLLoader.- Parameters:
desc- the zone's descriptorzonedata- to be loaded- Returns:
- the created zone
- Throws:
SAXException- if any xml parsing error happenedIOException- if any IO error happened
-
readZone
-
main
- Throws:
Exception
-