import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;
+import org.apache.commons.lang.StringUtils;
/**
*
Properties prop = new Properties();
prop.loadFromXML(new FileInputStream(file));
String ext = prop.getProperty("EXT");
- String main = prop.getProperty("MAIN");
- String in = prop.getProperty("IN");
- String out = prop.getProperty("OUT");
- String avfilter = prop.getProperty("AVFILTER");
+ String main = prop.getProperty("MAIN", "");
+ String in = prop.getProperty("IN", "");
+ String out = prop.getProperty("OUT", "");
+ String avfilter = prop.getProperty("AVFILTER", "");
- if (ext == null || main == null || in == null || out == null || avfilter == null) {
+ if (StringUtils.isBlank(ext)) {
throw new IOException("変換オプションファイル書式誤り ext: "
+ ext + ", main: " + main + ", in: " + in + ", out: " + out + ", avfilter: " + avfilter);
}