private void initialize() throws IOException {
        InputStream in;
        String path = System.getProperty("kakasi.itaijiDictionary.path");
        if (path != null) {
            in = new FileInputStream(path);
        } else {
            in = ItaijiDictionary.class.getResourceAsStream(
                "resources/itaijidict");
        }
        String encoding =
            System.getProperty("kakasi.itaijiDictionary.encoding");
        if (encoding == null) {
            encoding = "JISAutoDetect";
        }
        try {
            BufferedReader reader =
                new BufferedReader(new InputStreamReader(in, encoding));
            try {
                while (true) {
                    String line = reader.readLine();
                    if (line == null) {
                        break;
                    }
                    line = line.trim();
                    if (line.length() == 0) {
                        continue;
                    }
                    if (line.length() != 2) {
                        System.err.println("ItaijiDictionary: Ignored line: " +
                                           line);
                    }
                    table.put(new Character(line.charAt(0)),
                              new Character(line.charAt(1)));
                }
            } finally {
                try {
                    reader.close();
                    in = null;
                } catch (IOException exception) {
                    exception.printStackTrace();
                }
            }
        } finally {
            if (in != null) {
                try {
                    in.close();
                } catch (IOException exception) {
                    exception.printStackTrace();
                }
            }
        }
    }