![JAR search and dependency download from the Maven repository](/logo.png)
com.github.dnbn.submerge.api.parser.SubtitleParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of submerge-api Show documentation
Show all versions of submerge-api Show documentation
Library to manage SRT and ASS subtitles
The newest version!
package com.github.dnbn.submerge.api.parser;
import java.io.File;
import java.io.InputStream;
import com.github.dnbn.submerge.api.parser.exception.InvalidFileException;
import com.github.dnbn.submerge.api.parser.exception.InvalidSubException;
import com.github.dnbn.submerge.api.subtitle.common.TimedTextFile;
public interface SubtitleParser {
/**
* Parse a subtitle file and return the corresponding subtitle object
*
* @param file the subtitle file
* @return the subtitle object
* @throws InvalidSubException if the subtitle is not valid
* @throws InvalidFileException if the file is not valid
*/
TimedTextFile parse(File file);
/**
* Parse a subtitle file from an inputstream and return the corresponding subtitle
* object
*
* @param is the input stream
* @param fileName the fileName
* @return the subtitle object
* @throws InvalidSubException if the subtitle is not valid
* @throws InvalidFileException if the file is not valid
*/
TimedTextFile parse(InputStream is, String fileName);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy