Class ParserUtil
- java.lang.Object
-
- com.ongres.stringprep.codegenerator.parsers.ParserUtil
-
public class ParserUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description ParserUtil()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<List<Integer>>
parseToListArrayInt(String file)
Parse a file with ranges of hexadecimal to a list of list of integers.List<List<Integer>>
parseToListArrayInt(String file, Pattern pattern)
Parse a file with ranges of hexadecimal to a list of list of integers.List<Integer>
parseToListInteger(String file, Pattern pattern)
Parse a file with hexadecimal to a list of integers.Map<Integer,List<Integer>>
parseToMapListInteger(String file, Pattern patternLine, Pattern mapTo)
Parse a file with mappings to a map of list of integers.
-
-
-
Method Detail
-
parseToListInteger
public List<Integer> parseToListInteger(String file, Pattern pattern) throws NumberFormatException, IOException
Parse a file with hexadecimal to a list of integers.- Parameters:
file
- with the RFC file to parsepattern
- of the lines- Returns:
- list of integers
- Throws:
IOException
- if a RFC file can't be readNumberFormatException
-
parseToMapListInteger
public Map<Integer,List<Integer>> parseToMapListInteger(String file, Pattern patternLine, Pattern mapTo) throws IOException
Parse a file with mappings to a map of list of integers.- Parameters:
file
- with THE RFC file to parsepatternLine
- pattern of the linesmapTo
- pattern of the conversion- Returns:
- map of list of integers
- Throws:
IOException
- if a RFC file can't be read
-
parseToListArrayInt
public List<List<Integer>> parseToListArrayInt(String file) throws NumberFormatException, IOException
Parse a file with ranges of hexadecimal to a list of list of integers.- Parameters:
file
- with the RFC file to parse- Returns:
- list of list of integers
- Throws:
IOException
- if a RFC file can't be readNumberFormatException
-
parseToListArrayInt
public List<List<Integer>> parseToListArrayInt(String file, Pattern pattern) throws NumberFormatException, IOException
Parse a file with ranges of hexadecimal to a list of list of integers.- Parameters:
file
- with the RFC file to parsepattern
- of the lines- Returns:
- list of list of integers
- Throws:
IOException
- if a RFC file can't be readNumberFormatException
-
-