LineNumberReader r = new LineNumberReader(new InputStreamReader(is, "UTF-8"));
TextTrackImpl track = new TextTrackImpl();
String numberString;
while ((numberString = r.readLine()) != null) {
String timeString = r.readLine();
String lineString = "";
String s;
while (!((s = r.readLine()) == null || s.trim().equals(""))) {
lineString += s + "\n";
}
long startTime = parse(timeString.split("-->")[0]);
long endTime = parse(timeString.split("-->")[1]);
track.getSubs().add(new TextTrackImpl.Line(startTime, endTime, lineString));
}
return track;