Class ClassPathResourceMetadataLoader
java.lang.Object
com.google.i18n.phonenumbers.metadata.init.ClassPathResourceMetadataLoader
- All Implemented Interfaces:
MetadataLoader
A
MetadataLoader
implementation that reads phone number metadata files as classpath
resources.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionloadMetadata
(String metadataFileName) Returns an input stream corresponding to the metadata to load.
-
Constructor Details
-
ClassPathResourceMetadataLoader
public ClassPathResourceMetadataLoader()
-
-
Method Details
-
loadMetadata
Description copied from interface:MetadataLoader
Returns an input stream corresponding to the metadata to load. This method may be called concurrently so implementations must be thread-safe.- Specified by:
loadMetadata
in interfaceMetadataLoader
- Parameters:
metadataFileName
- file name (including path) of metadata to load. File path is an absolute class path like /com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto- Returns:
- the input stream for the metadata file. The library will close this stream after it is done. Return null in case the metadata file could not be found
-