|
1 | 1 | package com.github.dnbn.submerge.api.parser; |
2 | 2 |
|
3 | | -import java.io.File; |
4 | | -import java.io.InputStream; |
5 | | - |
6 | 3 | import com.github.dnbn.submerge.api.parser.exception.InvalidFileException; |
7 | 4 | import com.github.dnbn.submerge.api.parser.exception.InvalidSubException; |
8 | 5 | import com.github.dnbn.submerge.api.subtitle.common.TimedTextFile; |
9 | 6 |
|
| 7 | +import java.io.File; |
| 8 | +import java.io.InputStream; |
| 9 | + |
10 | 10 | public interface SubtitleParser { |
11 | 11 |
|
12 | | - /** |
13 | | - * Parse a subtitle file and return the corresponding subtitle object |
14 | | - * |
15 | | - * @param file the subtitle file |
16 | | - * @return the subtitle object |
17 | | - * @throws InvalidSubException if the subtitle is not valid |
18 | | - * @throws InvalidFileException if the file is not valid |
19 | | - */ |
20 | | - TimedTextFile parse(File file); |
| 12 | + /** |
| 13 | + * Parse a subtitle file and return the corresponding subtitle object |
| 14 | + * |
| 15 | + * @param file the subtitle file |
| 16 | + * @return the subtitle object |
| 17 | + * @throws InvalidSubException if the subtitle is not valid |
| 18 | + * @throws InvalidFileException if the file is not valid |
| 19 | + */ |
| 20 | + TimedTextFile parse(File file, String encodingCharSet); |
21 | 21 |
|
22 | | - /** |
23 | | - * Parse a subtitle file from an inputstream and return the corresponding subtitle |
24 | | - * object |
25 | | - * |
26 | | - * @param is the input stream |
27 | | - * @param fileName the fileName |
28 | | - * @return the subtitle object |
29 | | - * @throws InvalidSubException if the subtitle is not valid |
30 | | - * @throws InvalidFileException if the file is not valid |
31 | | - */ |
32 | | - TimedTextFile parse(InputStream is, String fileName); |
| 22 | + /** |
| 23 | + * Parse a subtitle file from an inputstream and return the corresponding subtitle |
| 24 | + * object |
| 25 | + * |
| 26 | + * @param is the input stream |
| 27 | + * @param fileName the fileName |
| 28 | + * @return the subtitle object |
| 29 | + * @throws InvalidSubException if the subtitle is not valid |
| 30 | + * @throws InvalidFileException if the file is not valid |
| 31 | + */ |
| 32 | + TimedTextFile parse(InputStream is, String fileName, String encodingCharSet); |
33 | 33 | } |
0 commit comments