File[] value = (File[]) trim.toArray(new File[0]);
File[] value = (File[]) trim.toArray(new File[trim.size()]);
  public File[] getFiles(File dir, boolean useFileHiding)  {    if (dir == null || dir.listFiles() == null)      return null;    File[] files = dir.listFiles();    if (! useFileHiding)      return files;    ArrayList trim = new ArrayList();    for (int i = 0; i < files.length; i++)      if (! files[i].isHidden())	trim.add(files[i]);    File[] value = (File[]) trim.toArray(new File[0]);    return value;  }