Commit | Line | Data |
---|---|---|
08fe2e33 NR |
1 | package be.nikiroo.fanfix.supported; |
2 | ||
3 | import java.io.File; | |
08fe2e33 | 4 | import java.io.IOException; |
08fe2e33 | 5 | import java.net.URL; |
08fe2e33 | 6 | |
68686a37 | 7 | import be.nikiroo.fanfix.data.MetaData; |
08fe2e33 NR |
8 | |
9 | /** | |
10 | * Support class for <tt>.info</tt> text files ({@link Text} files with a | |
11 | * <tt>.info</tt> metadata file next to them). | |
12 | * <p> | |
13 | * The <tt>.info</tt> file is supposed to be written by this program, or | |
14 | * compatible. | |
15 | * | |
16 | * @author niki | |
17 | */ | |
18 | class InfoText extends Text { | |
7445f856 NR |
19 | protected File getInfoFile() { |
20 | return new File(assureNoTxt(getSourceFile()).getPath() + ".info"); | |
21 | } | |
68686a37 | 22 | |
7445f856 NR |
23 | @Override |
24 | protected MetaData getMeta() throws IOException { | |
31e27ee3 | 25 | return InfoReader.readMeta(getInfoFile(), true); |
08fe2e33 NR |
26 | } |
27 | ||
28 | @Override | |
29 | protected boolean supports(URL url) { | |
86d49dbc | 30 | return supports(url, true); |
08fe2e33 | 31 | } |
08fe2e33 | 32 | } |