WorkingDirectory { public static boolean unpackMap(String foldername, InputStream source) { File dest = new File(getMapsFolder().getAbsolutePath() + "/" + foldername + "/"); if (!dest.exists()) { dest.mkdirs(); Gdx.app.log("WorkingDirectoy", "created map at " + dest); } byte[] buffer = new byte[1024]; try (ZipInputStream zis = new ZipInputStream(source)) { ZipEntry ze = zis.getNextEntry(); while (ze != null) { String file = ze.getName(); File newFile = new File(dest.getParent() + File.separator + file); System.out.println("Unzipping to " + newFile.getAbsolutePath()); if (newFile.isDirectory()) { } else { try (FileOutputStream fos = new FileOutputStream(newFile)) { int len; while ((len = zis.read(buffer)) > 0) { fos.write(buffer, 0, len); } } } zis.closeEntry(); ze = zis.getNextEntry(); } zis.closeEntry(); source.close(); } catch (IOException ex) { Logger.getLogger(WorkingDirectory.class.getName()).log(Level.SEVERE, null, ex); } return true; }  static void setApplicationName(String applicationName); static File getWorkingDirectory(); static OS getPlatform(); static File getMapsFolder(); static boolean unpackMap(String foldername, InputStream source); static boolean delete(); static boolean deleteDirectory(File directory);  }
@Test public void testUnpackMap() { System.out.println("unpackMap not tested"); }