Class ClassPathResourceMetadataLoader
- java.lang.Object
-
- com.google.i18n.phonenumbers.metadata.init.ClassPathResourceMetadataLoader
-
- All Implemented Interfaces:
MetadataLoader
public final class ClassPathResourceMetadataLoader extends Object implements MetadataLoader
AMetadataLoader
implementation that reads phone number metadata files as classpath resources.
-
-
Constructor Summary
Constructors Constructor Description ClassPathResourceMetadataLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
loadMetadata(String metadataFileName)
Returns an input stream corresponding to the metadata to load.
-
-
-
Method Detail
-
loadMetadata
public InputStream loadMetadata(String metadataFileName)
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
-
-