-5

How can i read a srt file , do some operations in it and finally export it in srt format in JAVA?

i wanna do it to create a program that change the time of a subtitle.

att,

Diego Sabino

Diego Sabino
  • 47
  • 3
  • 9

1 Answers1

3

Note that these programs already exists.

Search for: BufferedReader, InputStreamReader, FileInputStream. Use them like this:

BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));
String line;
while ((line = reader.readLine()) != null)
{
    System.out.println(line);
}
Martijn Courteaux
  • 67,591
  • 47
  • 198
  • 287