@Override
    public int read() throws IOException {
      int res;
      try {
        res = in.read();
      } catch (FileNotFoundException e) {
        res = tryOpen().read();
      }
      if (res > 0) {
        pos += 1;
      }
      return res;
    }
FileLink InputStream that handles the switch between the original path and the alternative
locations, when the file is moved.
hbase-server/src/main/java/org/apache/hadoop/hbase/io/FileLink.java