private static void parseImageryFile(Resources r,InputStream is,final boolean async) throws IOException {
  JsonReader reader=new JsonReader(new InputStreamReader(is,"UTF-8"));
  try {
    try {
      reader.beginArray();
      while (reader.hasNext()) {
        TileLayerServer osmts=readServer(reader,r,async);
        if (osmts != null) {
          if (osmts.overlay && !overlayServerList.containsKey(osmts.id)) {
            overlayServerList.put(osmts.id,osmts);
          }
 else           if (!backgroundServerList.containsKey(osmts.id)) {
            backgroundServerList.put(osmts.id,osmts);
          }
        }
      }
      reader.endArray();
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
  finally {
    reader.close();
  }
}

private static void parseImageryFile ( Resources r , InputStream is , final boolean async ) throws IOException { JsonReader reader = new JsonReader ( new InputStreamReader ( is , "UTF-8" ) ) ; try { try { reader . beginArray ( ) ; while ( reader . hasNext ( ) ) { TileLayerServer osmts = readServer ( reader , r , async ) ; if ( osmts != null ) { if ( osmts . overlay && ! overlayServerList . containsKey ( osmts . id ) ) { overlayServerList . put ( osmts . id , osmts ) ; } else if ( ! backgroundServerList . containsKey ( osmts . id ) ) { backgroundServerList . put ( osmts . id , osmts ) ; } } } reader . endArray ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } finally { reader . close ( ) ; } }
parse json files for imagery configs and add them to backgroundserverlist or overlayserverlist
