Package net.sf.freecol.server.generator
Class FreeColMapLoader
- java.lang.Object
-
- net.sf.freecol.server.generator.FreeColMapLoader
-
-
Constructor Summary
Constructors Constructor Description FreeColMapLoader(java.io.File file)
Constructor for the FreeColMapLoader class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map.Layer
getHighestLayer()
Returns the highest layer this MapLoader is able to load.Map.Layer
loadMap(Game game, Map.Layer layer)
Load a map into the given game, copying all layers up to the given layer.
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
importMap
private Map importMap
-
-
Constructor Detail
-
FreeColMapLoader
public FreeColMapLoader(java.io.File file) throws FreeColException, java.io.IOException, javax.xml.stream.XMLStreamException
Constructor for the FreeColMapLoader class.- Parameters:
file
- The File to load.- Throws:
FreeColException
- if the format is incompatible.java.io.IOException
- if the stream can not be created.javax.xml.stream.XMLStreamException
- if there is a problem reading the stream.
-
-
Method Detail
-
loadMap
public Map.Layer loadMap(Game game, Map.Layer layer)
Load a map into the given game, copying all layers up to the given layer. Returns the highest layer actually copied, e.g. NONE if map loading failed, or the highest level available if an even higher level was requested.
-
getHighestLayer
public Map.Layer getHighestLayer()
Returns the highest layer this MapLoader is able to load.- Specified by:
getHighestLayer
in interfaceMapLoader
- Returns:
- a
Layer
value
-
-