summaryrefslogtreecommitdiff
path: root/libphonenumber/src/com/google/i18n/phonenumbers/MetadataLoader.java
diff options
context:
space:
mode:
Diffstat (limited to 'libphonenumber/src/com/google/i18n/phonenumbers/MetadataLoader.java')
-rw-r--r--libphonenumber/src/com/google/i18n/phonenumbers/MetadataLoader.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/MetadataLoader.java b/libphonenumber/src/com/google/i18n/phonenumbers/MetadataLoader.java
index 9904bcda..44fa0dc4 100644
--- a/libphonenumber/src/com/google/i18n/phonenumbers/MetadataLoader.java
+++ b/libphonenumber/src/com/google/i18n/phonenumbers/MetadataLoader.java
@@ -19,17 +19,21 @@ package com.google.i18n.phonenumbers;
import java.io.InputStream;
/**
- * Interface for caller to specify a customized phone metadata loader.
+ * Interface for clients to specify a customized phone metadata loader, useful for Android apps to
+ * load Android resources since the library loads Java resources by default, e.g. with
+ * <a href="http://developer.android.com/reference/android/content/res/AssetManager.html">
+ * AssetManager</a>. Note that implementation owners have the responsibility to ensure this is
+ * thread-safe.
*/
public interface MetadataLoader {
/**
* Returns an input stream corresponding to the metadata to load. This method may be called
* concurrently so implementations must be thread-safe.
*
- * @param metadataFileName File name (including path) of metadata to load. File path is an
- * absolute class path like /com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto.
- * @return 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.
+ * @param metadataFileName file name (including path) of metadata to load. File path is an
+ * absolute class path like /com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto
+ * @return 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
*/
public InputStream loadMetadata(String metadataFileName);
}