public static void main(final String[] args) throws FileNotFoundException,
			IOException {
		if (args.length == 2) {
			BufferedReader br = null;
			FileInputStream dictFile = null;
			try {
				dictFile = new FileInputStream(args[0]);
				final Dictionary dict = Dictionary.createDictionary(dictFile);
				final NumberToWordMapper mapper = new NumberToWordMapper(dict);
				final Encoder encoder = new Encoder(mapper);

				br = new BufferedReader(new FileReader(args[1]));
				String number;
				while ((number = br.readLine()) != null) {
					final PhoneNumber phoneNumber = new PhoneNumber(number);
					final List<String> result = encoder.encode(phoneNumber);
					
					for (String text : result) {
						System.out.println(phoneNumber.toString() + ": " + text);
					}
				}
			} finally {
				if (dictFile != null) {
					dictFile.close();
				}
				
				if (br != null) {
					br.close();
				}
			}
		} else {
			System.out
					.println("Expected format: EncodeNumbers dict-file number-file");
		}
	}