javax.time.calendar.zone
Class TZDBZoneRulesCompiler

java.lang.Object
  extended by javax.time.calendar.zone.TZDBZoneRulesCompiler

public final class TZDBZoneRulesCompiler
extends java.lang.Object

A builder that can read the TZDB time-zone files and build ZoneRules instances.

This class is a mutable builder. A new instance must be created for each compile.

Author:
Stephen Colebourne

Constructor Summary
TZDBZoneRulesCompiler(java.lang.String version, java.util.List<java.io.File> sourceFiles, java.io.File leapSecondsFile, boolean verbose)
          Creates an instance if you want to invoke the compiler manually.
 
Method Summary
 void compile()
          Compile the rules file.
 java.util.SortedMap<LocalDate,java.lang.Byte> getLeapSeconds()
          Gets the parsed leap seconds.
 java.util.SortedMap<java.lang.String,ZoneRules> getZones()
          Gets the parsed zone rules.
static void main(java.lang.String[] args)
          Reads a set of TZDB files and builds a single combined data file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TZDBZoneRulesCompiler

public TZDBZoneRulesCompiler(java.lang.String version,
                             java.util.List<java.io.File> sourceFiles,
                             java.io.File leapSecondsFile,
                             boolean verbose)
Creates an instance if you want to invoke the compiler manually.

Parameters:
version - the version, such as 2009a, not null
sourceFiles - the list of source files, not empty, not null
verbose - whether to output verbose messages
Method Detail

main

public static void main(java.lang.String[] args)
Reads a set of TZDB files and builds a single combined data file.

Parameters:
args - the arguments

compile

public void compile()
             throws java.lang.Exception
Compile the rules file.

Use getZones() and getLeapSeconds() to retrieve the parsed data.

Throws:
java.lang.Exception - if an error occurs

getZones

public java.util.SortedMap<java.lang.String,ZoneRules> getZones()
Gets the parsed zone rules.

Returns:
the parsed zone rules, not null

getLeapSeconds

public java.util.SortedMap<LocalDate,java.lang.Byte> getLeapSeconds()
Gets the parsed leap seconds.

Returns:
the parsed and sorted leap seconds, not null