JNUSLib/src/de/mas/wiiu/jnus/NUSTitleLoaderLocal.java
2017-05-17 19:20:42 +02:00

35 lines
1000 B
Java

package de.mas.wiiu.jnus;
import de.mas.wiiu.jnus.entities.Ticket;
import de.mas.wiiu.jnus.implementations.NUSDataProvider;
import de.mas.wiiu.jnus.implementations.NUSDataProviderLocal;
public final class NUSTitleLoaderLocal extends NUSTitleLoader {
private NUSTitleLoaderLocal() {
super();
}
public static NUSTitle loadNUSTitle(String inputPath) throws Exception {
return loadNUSTitle(inputPath, null);
}
public static NUSTitle loadNUSTitle(String inputPath, Ticket ticket) throws Exception {
NUSTitleLoader loader = new NUSTitleLoaderLocal();
NUSTitleConfig config = new NUSTitleConfig();
if (ticket != null) {
config.setTicket(ticket);
}
config.setInputPath(inputPath);
return loader.loadNusTitle(config);
}
@Override
protected NUSDataProvider getDataProvider(NUSTitle title, NUSTitleConfig config) {
return new NUSDataProviderLocal(title, config.getInputPath());
}
}