@SuppressWarnings("unchecked")
  public JSONArray fileStatusToJSON(FileStatus[] status) {
    JSONArray json = new JSONArray();
    if (status != null) {
      for (FileStatus s : status) {
        json.add(fileStatusToJSON(s));
      }
    }
    return json;
  }
Converts a Hadoop <code>FileStatus</code> array into a JSON array object.
It replaces the <code>SCHEME://HOST:PORT</code> of the path with the
specified URL.
<p/>

@param status Hadoop file status array.
@return The JSON representation of the file status array.
contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/HdfsApi.java