public class

ZoneInfoProvider

extends Object
implements Provider
java.lang.Object
   ↳ org.joda.time.tz.ZoneInfoProvider

Class Overview

ZoneInfoProvider loads compiled data files as generated by ZoneInfoCompiler.

ZoneInfoProvider is thread-safe and publicly immutable.

Summary

Public Constructors
ZoneInfoProvider(File fileDir)
ZoneInfoProvider searches the given directory for compiled data files.
ZoneInfoProvider(String resourcePath)
ZoneInfoProvider searches the given ClassLoader resource path for compiled data files.
ZoneInfoProvider(String resourcePath, ClassLoader loader)
ZoneInfoProvider searches the given ClassLoader resource path for compiled data files.
Public Methods
synchronized Set getAvailableIDs()
Gets a list of all the available zone ids.
synchronized DateTimeZone getZone(String id)
If an error is thrown while loading zone data, uncaughtException is called to log the error and null is returned for this and all future requests.
Protected Methods
void uncaughtException(Exception ex)
Called if an exception is thrown from getZone while loading zone data.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.joda.time.tz.Provider

Public Constructors

public ZoneInfoProvider (File fileDir)

ZoneInfoProvider searches the given directory for compiled data files.

Throws
IOException if directory or map file cannot be read

public ZoneInfoProvider (String resourcePath)

ZoneInfoProvider searches the given ClassLoader resource path for compiled data files. Resources are loaded from the ClassLoader that loaded this class.

Throws
IOException if directory or map file cannot be read

public ZoneInfoProvider (String resourcePath, ClassLoader loader)

ZoneInfoProvider searches the given ClassLoader resource path for compiled data files.

Parameters
loader ClassLoader to load compiled data files from. If null, use system ClassLoader.
Throws
IOException if directory or map file cannot be read

Public Methods

public synchronized Set getAvailableIDs ()

Gets a list of all the available zone ids.

Returns
  • the zone ids

public synchronized DateTimeZone getZone (String id)

If an error is thrown while loading zone data, uncaughtException is called to log the error and null is returned for this and all future requests.

Parameters
id the id to load
Returns
  • the loaded zone

Protected Methods

protected void uncaughtException (Exception ex)

Called if an exception is thrown from getZone while loading zone data.

Parameters
ex the exception