Package gamedata
Class ConversionMap.Parser
- java.lang.Object
-
- gamedata.ResourceParser<ConversionMap.Entry>
-
- gamedata.ConversionMap.Parser
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Enclosing class:
- ConversionMap
public static final class ConversionMap.Parser extends ResourceParser<ConversionMap.Entry>
A parser for conversion map files.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConversionMap.Entry
next()
Returns the next resource listed in the file, ornull
if there are no more resources available.-
Methods inherited from class gamedata.ResourceParser
close, error, errorMessage, getIdentifier, getIdentifierString, getLanguage, getLineNumber, isParsingGently, readLine, readNonemptyLine, readProperty, readProperty, setIdentifier, setLanguage, warning
-
-
-
-
Constructor Detail
-
Parser
public Parser(java.lang.String resource, boolean gentle) throws java.io.IOException
Creates a new parser for the specified resource file.- Parameters:
resource
- the location of the conversion map resourcegentle
- iftrue
, parses in gentle mode- Throws:
java.io.IOException
- if an I/O error occurs
-
Parser
public Parser(java.io.InputStream in, boolean gentle) throws java.io.IOException
Creates a new parser for the specified input stream.- Parameters:
in
- the input stream to read fromgentle
- iftrue
, parses in gentle mode- Throws:
java.io.IOException
- if an I/O error occurs
-
-
Method Detail
-
next
public ConversionMap.Entry next() throws java.io.IOException
Description copied from class:ResourceParser
Returns the next resource listed in the file, ornull
if there are no more resources available.- Specified by:
next
in classResourceParser<ConversionMap.Entry>
- Returns:
- the next resource
- Throws:
java.io.IOException
- if an I/O error occurs
-
-