use of io.discloader.discloader.common.language.Language in project DiscLoader by R3alCl0ud.
the class ZipReader method readZip.
public static void readZip(File zip) {
ZipFile zipFile = null;
try {
try {
zipFile = new ZipFile(zip);
} catch (ZipException e) {
e.printStackTrace();
}
if (zipFile != null) {
// read zip file
for (ZipEntry e : readEntries(zipFile.entries())) {
if (e.getName().endsWith(".lang")) {
// the entry is a language file
InputStream is = zipFile.getInputStream(e);
Language lang = new Language(is, getLocale(e.getName()));
LanguageRegistry.registerLanguage(lang);
} else if (e.getName().endsWith(".png")) {
// the entry is an icon
InputStream is = zipFile.getInputStream(e);
is.close();
// TextureRegistry.resourceHandler.addResource(is, e);
}
}
}
} catch (IOException e) {
e.printStackTrace();
}
}
Aggregations