1 /* GENERATED SOURCE. DO NOT MODIFY. */ 2 /* 3 * Copyright (C) 2014 The Libphonenumber Authors 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 package com.android.i18n.phonenumbers; 19 20 import java.io.InputStream; 21 22 /** 23 * Interface for clients to specify a customized phone metadata loader, useful for Android apps to 24 * load Android resources since the library loads Java resources by default, e.g. with 25 * <a href="http://developer.android.com/reference/android/content/res/AssetManager.html"> 26 * AssetManager</a>. Note that implementation owners have the responsibility to ensure this is 27 * thread-safe. 28 * @hide This class is not part of the Android public SDK API 29 */ 30 public interface MetadataLoader { 31 /** 32 * Returns an input stream corresponding to the metadata to load. This method may be called 33 * concurrently so implementations must be thread-safe. 34 * 35 * @param metadataFileName file name (including path) of metadata to load. File path is an 36 * absolute class path like /com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto 37 * @return the input stream for the metadata file. The library will close this stream 38 * after it is done. Return null in case the metadata file could not be found 39 */ 40 public InputStream loadMetadata(String metadataFileName); 41 } 42