docs: public int[] importFromFileCache(boolean removeFromFileSystem) {
          final SQLiteDatabase db = getDb();
          int[] ret = new int[]{0, 0, 0, 0};
          //inserts
          //insert failures
          //deletes
          //delete failures
          File tilePathBase = Configuration.getInstance().getOsmdroidTileCache();
          if (tilePathBase.exists()) {
              File[] tileSources = tilePathBase.listFiles();
              if (tileSources != null) {
                  for (int i = 0; i < tileSources.length; i++) {
                      if (tileSources[i].isDirectory() && !tileSources[i].isHidden()) {
                          //proceed
                          File[] z = tileSources[i].listFiles();
                          if (z != null)
                              for (int zz = 0; zz < z.length; zz++) {
                                  if (z[zz].isDirectory() && !z[zz].isHidden()) {
                                      File[] x = z[zz].listFiles();
                                      if (x != null)
                                          for (int xx = 0; xx < x.length; xx++) {
                                              if (x[xx].isDirectory() && !x[xx].isHidden()) {
                                                  File[] y = x[xx].listFiles();
                                                  if (x != null)
                                                      for (int yy = 0; yy < y.length; yy++) {
                                                          if (!y[yy].isHidden() && !y[yy].isDirectory()) {
  
                                                              try {
                                                                  ContentValues cv = new ContentValues();
                                                                  final long x1 = Long.parseLong(x[xx].getName());
                                                                  final long y1 = Long.parseLong(y[yy].getName().substring(0, y[yy].getName().indexOf(".")));
                                                                  final long z1 = Long.parseLong(z[zz].getName());
                                                                  final long index = getIndex(x1, y1, z1);
                                                                  cv.put(DatabaseFileArchive.COLUMN_PROVIDER, tileSources[i].getName());
                                                                  if (!exists(tileSources[i].getName(), MapTileIndex.getTileIndex((int) z1, (int) x1, (int) y1))) {
  
                                                                      BufferedInputStream bis = new BufferedInputStream(new FileInputStream(y[yy]));
  
                                                                      List<Byte> list = new ArrayList<Byte>();
                                                                      //ByteArrayBuffer baf = new ByteArrayBuffer(500);
                                                                      int current = 0;
                                                                      while ((current = bis.read()) != -1) {
                                                                          list.add((byte) current);
                                                                      }
  
                                                                      byte[] bits = new byte[list.size()];
                                                                      for (int bi = 0; bi < list.size(); bi++) {
                                                                          bits[bi] = list.get(bi);
                                                                      }
                                                                      cv.put(DatabaseFileArchive.COLUMN_KEY, index);
                                                                      cv.put(DatabaseFileArchive.COLUMN_TILE, bits);
  
                                                                      long insert = db.insert(TABLE, null, cv);
                                                                      if (insert > 0) {
                                                                          if (Configuration.getInstance().isDebugMode())
                                                                              Log.d(IMapView.LOGTAG, "tile inserted " + tileSources[i].getName() + "/" + z1 + "/" + x1 + "/" + y1);
                                                                          ret[0]++;
                                                                          if (removeFromFileSystem) {
                                                                              try {
                                                                                  y[yy].delete();
                                                                                  ret[2]++;
                                                                                  ;
                                                                              } catch (Exception ex) {
                                                                                  ret[3]++;
                                                                                  ;
                                                                              }
                                                                          }
                                                                      } else {
                                                                          Log.w(IMapView.LOGTAG, "tile NOT inserted " + tileSources[i].getName() + "/" + z1 + "/" + x1 + "/" + y1);
                                                                      }
                                                                  }
  
                                                              } catch (Exception ex) {
                                                                  //note, although we check for db null state at the beginning of this method, it's possible for the
                                                                  //db to be closed during the execution of this method
                                                                  Log.e(IMapView.LOGTAG, "Unable to store cached tile from " + tileSources[i].getName() + " db is " + (db == null ? "null" : "not null"), ex);
                                                                  ret[1]++;
                                                                  catchException(ex);
                                                              }
                                                          }
                                                      }
                                              }
                                              if (removeFromFileSystem) {
                                                  //clean up the directories
                                                  try {
                                                      x[xx].delete();
                                                  } catch (Exception ex) {
                                                      Log.e(IMapView.LOGTAG, "Unable to delete directory from " + x[xx].getAbsolutePath(), ex);
                                                      ret[3]++;
                                                  }
                                              }
                                          }
                                  }
                                  if (removeFromFileSystem) {
                                      //clean up the directories
                                      try {
                                          z[zz].delete();
                                      } catch (Exception ex) {
                                          Log.e(IMapView.LOGTAG, "Unable to delete directory from " + z[zz].getAbsolutePath(), ex);
                                          ret[3]++;
                                      }
                                  }
                              }
  
  
                          if (removeFromFileSystem) {
                              //clean up the directories
                              try {
                                  tileSources[i].delete();
                              } catch (Exception ex) {
                                  Log.e(IMapView.LOGTAG, "Unable to delete directory from " + tileSources[i].getAbsolutePath(), ex);
                                  ret[3]++;
                              }
                          }
  
                      } else {
                          //it's a file, nothing for us to do here
                      }
                  }
              }
  
          }
          return ret;
      }