Merge branch 'master' into subtree
[nikiroo-utils.git] / supported / InfoText.java
CommitLineData
08fe2e33
NR
1package be.nikiroo.fanfix.supported;
2
3import java.io.File;
08fe2e33 4import java.io.IOException;
08fe2e33 5import java.net.URL;
08fe2e33 6
68686a37 7import 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 */
18class 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}