Class ZoneInfoCompiler

  • public class ZoneInfoCompiler
    extends java.lang.Object
    Compiles IANA ZoneInfo database files into binary files for each time zone in the database. DateTimeZoneBuilder is used to construct and encode compiled data files. ZoneInfoProvider loads the encoded files and converts them back into DateTimeZone objects.

    Although this tool is similar to zic, the binary formats are not compatible. The latest IANA time zone database files may be obtained here.

    ZoneInfoCompiler is mutable and not thread-safe, although the main method may be safely invoked by multiple threads.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​DateTimeZone> compile​( outputDir,[] sources)
      Returns a map of ids to DateTimeZones.
      static void main​(java.lang.String[] args)
      Launches the ZoneInfoCompiler tool.
      void parseDataFile​( in, boolean backward)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ZoneInfoCompiler

        public ZoneInfoCompiler()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Launches the ZoneInfoCompiler tool.
         Usage: java <options> <source files>
         where possible options include:
           -src <directory>    Specify where to read source files
           -dst <directory>    Specify where to write generated files
           -verbose            Output verbosely (default false)
      • compile

        public java.util.Map<java.lang.String,​DateTimeZone> compile​( outputDir,
                                                                [] sources)
        Returns a map of ids to DateTimeZones.
        outputDir - optional directory to write compiled data files to
        sources - optional list of source files to parse
      • parseDataFile

        public void parseDataFile​( in,
                                  boolean backward)