public MovieSubtitles parseSubtitlies(String fileName)
			throws SubtitlesParserException {
		MovieSubtitles result = new MovieSubtitles();
		InputStream inputStream = getClass().getClassLoader()
				.getResourceAsStream(fileName);
		if (inputStream == null) {
			try {
				inputStream = new FileInputStream(fileName);
			} catch (FileNotFoundException e) {
				throw new SubtitlesParserException("File " + fileName
						+ " is not found.", e);
			}
		}
		// parse subtitles from file
		try {
			BufferedReader reader = new BufferedReader(new InputStreamReader(
					inputStream));
			String line = reader.readLine();
			List<Phrase> phrases = new ArrayList<Phrase>();
			while (line != null) {
				if (isPhraseTime(line)) {
					// get phrase time
					Phrase phrase = parsePhraseTime(line);
					StringBuilder text = new StringBuilder();
					// get phrase text
					while (isPhraseText(line = reader.readLine())) {
						text.append(line).append(" ");
					}
					phrase.setText(text.toString());
					phrases.add(phrase);
				} else {
					line = reader.readLine();
				}
			}
			result.setPhrases(phrases);
			result.setLanguage("en");
		} catch (IOException e) {
			throw new SubtitlesParserException(
					"IO error occurred while parsing " + fileName + ".", e);
		} finally {
			try {
				inputStream.close();
			} catch (IOException e) {
				// ignore
			}
		}

		return result;
	}