Package org.joda.time.tz
Class ZoneInfoCompiler
- java.lang.Object
-
- org.joda.time.tz.ZoneInfoCompiler
-
public class ZoneInfoCompiler extends java.lang.ObjectCompiles Olson ZoneInfo database files into binary files for each time zone in the database.DateTimeZoneBuilderis used to construct and encode compiled data files.ZoneInfoProviderloads the encoded files and converts them back intoDateTimeZoneobjects.Although this tool is similar to zic, the binary formats are not compatible. The latest Olson database files may be obtained here.
ZoneInfoCompiler is mutable and not thread-safe, although the main method may be safely invoked by multiple threads.
- Since:
- 1.0
- Author:
- Brian S O'Neill
-
-
Constructor Summary
Constructors Constructor Description ZoneInfoCompiler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Mapcompile(java.io.File outputDir, java.io.File[] sources)Returns a map of ids to DateTimeZones.static voidmain(java.lang.String[] args)Launches the ZoneInfoCompiler tool.voidparseDataFile(java.io.BufferedReader in)
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.lang.ExceptionLaunches the ZoneInfoCompiler tool.Usage: java org.joda.time.tz.ZoneInfoCompiler <options> <source files> where possible options include: -src <directory> Specify where to read source files -dst <directory> Specify where to write generated files
- Throws:
java.lang.Exception
-
compile
public java.util.Map compile(java.io.File outputDir, java.io.File[] sources) throws java.io.IOExceptionReturns a map of ids to DateTimeZones.- Parameters:
outputDir- optional directory to write compiled data files tosources- optional list of source files to parse- Throws:
java.io.IOException
-
parseDataFile
public void parseDataFile(java.io.BufferedReader in) throws java.io.IOException- Throws:
java.io.IOException
-
-