/* If outputDir doesn't end with file-separator, adds it. */ if (!outputDir.endsWith(File.separator)) {
outputDir += File.separatorChar;
}
/* If zonefile includes file-separator, it's treated as part of *pathname.Andmakedirectoryifnecessary.
*/ int index = zonefile.lastIndexOf(File.separatorChar); if (index != -1) {
outputDir += zonefile.substring(0, index+1);
}
File outD = new File(outputDir);
outD.mkdirs();
FileOutputStream fos = new FileOutputStream(outputDir + zonefile.substring(index+1));
DataOutputStream dos = new DataOutputStream(fos);
if ((dstOffsets == null && offsets != null) ||
(dstOffsets != null && offsets == null)) {
Main.panic("Data not exist. (dstOffsets or offsets)"); return1;
}
/* Output Transition records */
dos.writeByte(ZoneInfoFile.TAG_Transition);
size = transitions.size();
dos.writeShort((size * 8) & 0xFFFF); int dstoffset; for (int i = 0; i < size; i++) { /* if DST offset is 0, this means DST isn't used. *(NOT:offset'sindexis0.)
*/ if ((dstoffset = dstOffsets.get(i).intValue()) == -1) {
dstoffset = 0;
}
/** *GeneratesZoneInfoMappingsinbinaryTLVformatforeachzone. *Regardingcontentsofoutputfiles,see{@linkZoneInfoFile}. * *@paramMappings *@return0ifnoerrors,or1iferroroccurred.
*/ int generateSrc(Mappings map) { try { int index; int block_size; int roi_size; long fp;
String outputDir = Main.getOutputDir();
/* If outputDir doesn't end with file-separator, adds it. */ if (!outputDir.endsWith(File.separator)) {
outputDir += File.separatorChar;
}
File outD = new File(outputDir);
outD.mkdirs();
/* Open ZoneInfoMapping file to write. */
RandomAccessFile raf = new RandomAccessFile(outputDir + ZoneInfoFile.JAVAZM_FILE_NAME, "rw");
/* Whether rawOffsetIndex list exists or not. */
List<Integer> roi = map.getRawOffsetsIndex(); if (roi == null) {
Main.panic("Data not exist. (rawOffsetsIndex)"); return1;
}
roi_size = roi.size();
/* Whether rawOffsetIndexTable list exists or not. */
List<Set<String>> roit = map.getRawOffsetsIndexTable(); if (roit == null || roit.size() != roi_size) {
Main.panic("Data not exist. (rawOffsetsIndexTable) Otherwise, Invalid size"); return1;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.