/** * Outputs the timezone entry in the JAR file. */ private static void outputTzdbEntry( JarOutputStream jos, Map<String, SortedMap<String, ZoneRules>> allBuiltZones, Set<String> allRegionIds, Set<ZoneRules> allRules) { // this format is not publicly specified try { jos.putNextEntry(new ZipEntry("org/threeten/bp/TZDB.dat")); outputTzdbDat(jos, allBuiltZones, allRegionIds, allRules); jos.closeEntry(); } catch (Exception ex) { System.out.println("Failed: " + ex.toString()); ex.printStackTrace(); System.exit(1); } }
/** * Outputs the timezone entry in the JAR file. */ private static void outputTzdbEntry( JarOutputStream jos, Map<String, SortedMap<String, ZoneRules>> allBuiltZones, Set<String> allRegionIds, Set<ZoneRules> allRules) { // this format is not publicly specified try { jos.putNextEntry(new ZipEntry("org/threeten/bp/TZDB.dat")); outputTzdbDat(jos, allBuiltZones, allRegionIds, allRules); jos.closeEntry(); } catch (Exception ex) { System.out.println("Failed: " + ex.toString()); ex.printStackTrace(); System.exit(1); } }
/** * Outputs the DAT files. */ private static void outputFilesDat(File dstDir, Map<String, SortedMap<String, ZoneRules>> allBuiltZones, Set<String> allRegionIds, Set<ZoneRules> allRules, SortedMap<LocalDate, Byte> leapSeconds) { File tzdbFile = new File(dstDir, "TZDB.dat"); tzdbFile.delete(); try { FileOutputStream fos = null; try { fos = new FileOutputStream(tzdbFile); outputTzdbDat(fos, allBuiltZones, allRegionIds, allRules); } finally { if (fos != null) { fos.close(); } } } catch (Exception ex) { System.out.println("Failed: " + ex.toString()); ex.printStackTrace(); System.exit(1); } }
/** * Outputs the DAT files. */ private static void outputFilesDat(File dstDir, Map<String, SortedMap<String, ZoneRules>> allBuiltZones, Set<String> allRegionIds, Set<ZoneRules> allRules, SortedMap<LocalDate, Byte> leapSeconds) { File tzdbFile = new File(dstDir, "TZDB.dat"); tzdbFile.delete(); try { FileOutputStream fos = null; try { fos = new FileOutputStream(tzdbFile); outputTzdbDat(fos, allBuiltZones, allRegionIds, allRules); } finally { if (fos != null) { fos.close(); } } } catch (Exception ex) { System.out.println("Failed: " + ex.toString()); ex.printStackTrace(); System.exit(1); } }