本文整理了Java中com.gabrielittner.threetenbp.ZoneWriter
类的一些代码示例,展示了ZoneWriter
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoneWriter
类的具体详情如下:
包路径:com.gabrielittner.threetenbp.ZoneWriter
类名称:ZoneWriter
暂无
代码示例来源:origin: gabrielittner/lazythreetenbp
void writeZones(SortedMap<String, ZoneRules> zones) throws IOException {
if (Files.exists(outputDir)) {
Files.walkFileTree(outputDir, FILE_DELETER);
}
for (Map.Entry<String, ZoneRules> entry : zones.entrySet()) {
writeZoneRulesFile(outputDir.resolve(fileName(entry.getKey())), entry.getValue());
}
}
代码示例来源:origin: gabrielittner/lazythreetenbp
private void run() {
try {
SortedMap<String, ZoneRules> zones = compiler.compile();
javaWriter.writeZoneIds(version, zones.keySet());
zoneWriter.writeZones(zones);
} catch (Exception ex) {
System.out.println("Failed: " + ex.toString());
ex.printStackTrace();
}
}
代码示例来源:origin: gabrielittner/lazythreetenbp
@Before
public void setup() throws IOException {
outputDir = Files.createTempDirectory(null);
zoneWriter = new ZoneWriter(outputDir);
}
代码示例来源:origin: gabrielittner/lazythreetenbp
private Path zoneFile(String zoneId) {
return outputDir.resolve(ZoneWriter.fileName(zoneId));
}
代码示例来源:origin: gabrielittner/lazythreetenbp
private LazyZoneRulesCompiler(CompilerOptions o) {
version = o.version;
compiler = new ZoneRulesCompat(version, o.tzdbFiles(), o.leapSecondFile(), o.verbose);
javaWriter = new JavaWriter(o.codeOutputDir);
zoneWriter = new ZoneWriter(o.tzdbOutputDir);
}
代码示例来源:origin: gabrielittner/lazythreetenbp
private SortedMap<String, ZoneRules> generateZones(String... zoneIds) throws IOException {
SortedMap<String, ZoneRules> zones = new TreeMap<>();
for (String zoneId : zoneIds) {
zones.put(zoneId, ZoneRulesProvider.getRules(zoneId, false));
}
zoneWriter.writeZones(zones);
return zones;
}
内容来源于网络,如有侵权,请联系作者删除!