/** * Read all parameters from the registry * * @param crsCode the code corresponding to the information that must be * extracted from the registry * @param regexPattern the pattern used to split the line that describes the * coordinate system * @return * @throws IOException */ public Map<String, String> readParameters(String crsCode, Pattern regexPattern) throws IOException { InputStream inStr = Registry.class.getResourceAsStream(registry.getRegistryName()); if (inStr == null) { throw new IllegalStateException("Unable to access CRS file: " + registry.getRegistryName()); } BufferedReader reader = new BufferedReader(new InputStreamReader(inStr)); Map<String, String> args; try { args = readRegistry(reader, crsCode, regexPattern); } finally { reader.close(); } return args; }