Package org.joda.time.tz
Class ZoneInfoProvider
java.lang.Object
org.joda.time.tz.ZoneInfoProvider
- All Implemented Interfaces:
Provider
ZoneInfoProvider loads compiled data files as generated by
ZoneInfoCompiler
.
ZoneInfoProvider is thread-safe and publicly immutable.
- Since:
- 1.0
- Author:
- Brian S O'Neill
-
Constructor Summary
ConstructorsConstructorDescriptionSearch the default classloader resource path for compiled data files.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. -
Method Summary
Modifier and TypeMethodDescriptionGets a list of all the available zone ids.If an error is thrown while loading zone data, the exception is logged to system error and null is returned for this and all future requests.protected void
Called if an exception is thrown from getZone while loading zone data.
-
Constructor Details
-
ZoneInfoProvider
Search the default classloader resource path for compiled data files.- Throws:
IOException
- if directory or map file cannot be read
-
ZoneInfoProvider
ZoneInfoProvider searches the given directory for compiled data files.- Throws:
IOException
- if directory or map file cannot be read
-
ZoneInfoProvider
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
-
ZoneInfoProvider
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
-
-
Method Details
-
getZone
If an error is thrown while loading zone data, the exception is logged to system error and null is returned for this and all future requests. -
getAvailableIDs
Gets a list of all the available zone ids.- Specified by:
getAvailableIDs
in interfaceProvider
- Returns:
- the zone ids
-
uncaughtException
Called if an exception is thrown from getZone while loading zone data.- Parameters:
ex
- the exception
-