code: public static LocatedBlockFileStatus toLocatedBlockFileStatus(HdfsFileStatus stat,
        LocatedBlocks locs, String src) {
      if (stat == null) {
        return null;
      }
      return new LocatedBlockFileStatus(stat.getLen(),
          stat.isDir(), stat.getReplication(),
          stat.getBlockSize(), stat.getModificationTime(),
          stat.getAccessTime(),
          stat.getPermission(), stat.getOwner(), stat.getGroup(),
          stat.getFullPath(new Path(src)), // full path
          DFSUtil.locatedBlocks2BlockLocations(locs),
          locs.isUnderConstruction());
    }
docs: Convert an HdfsFileStatus and its block locations to a LocatedFileStatus
  @param stat an HdfsFileStatus
  @param locs the file's block locations
  @param src parent path in string representation
  @return a FileStatus object