Question

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

Was it helpful?

Solution

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);
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top