[IMPL] mkvtoolproperties

This commit is contained in:
RatzzFatzz
2019-11-21 23:44:31 +01:00
commit 5aeddfa968
4 changed files with 237 additions and 0 deletions

5
src/main/java/Main.java Normal file
View File

@@ -0,0 +1,5 @@
public class Main {
public static void main(String[] args) {
}
}

View File

@@ -0,0 +1,29 @@
package config;
import lombok.extern.log4j.Log4j2;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@Log4j2
public class MKVToolProperties {
private String directoryPath;
private Path mkvmergePath;
private Path mkvpropeditPath;
public MKVToolProperties() {
try(Stream<String> stream = Files.lines(Paths.get("mkvDirectoryPath"))) {
directoryPath = stream.collect(Collectors.joining("\n"));
}catch(IOException e) {
log.fatal(e.getMessage());
}
mkvmergePath = Paths.get(directoryPath + "mkvmerge.exe");
mkvpropeditPath = Paths.get(directoryPath + "mkvpropedit.exe");
}
}