Either
for(int i = 0; i < roots.length; i++) {
File[] files = new File(roots[i].toString()).listFiles();
if (files != null) {
getFiles(files);
}
}
or
public void getFiles(File[] files) {
if(files != null) {
for(File file : files) {
if(file.isDirectory()) {
getFiles(file.listFiles());
}
else {
fs.add(file.toString());
}
}
}
}