Class ZonesXMLLoader
java.lang.Object
games.stendhal.server.core.config.ZonesXMLLoader
Load and configure zones via an XML configuration file.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
A zone descriptor. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
load()
Load a group of zones into a world.protected StendhalRPZone
load(ZonesXMLLoader.ZoneDesc desc, StendhalMapStructure zonedata)
Load zone data and create a new zone from it.protected void
load(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, IOExceptionLoad 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
-