Package com.google.i18n.phonenumbers.prefixmapper

Examples of com.google.i18n.phonenumbers.prefixmapper.MappingFileProvider.readExternal()


  public void testOutputBinaryConfiguration() throws IOException {
    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
    GeneratePhonePrefixData.outputBinaryConfiguration(AVAILABLE_DATA_FILES, byteArrayOutputStream);
    MappingFileProvider mappingFileProvider = new MappingFileProvider();
    mappingFileProvider.readExternal(
        new ObjectInputStream(new ByteArrayInputStream(byteArrayOutputStream.toByteArray())));
    assertEquals("1|en,en_US,es,\n33|en,fr,\n86|zh_Hans,\n", mappingFileProvider.toString());
  }

  private static Map<Integer, String> parseTextFileHelper(String input) throws IOException {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.