jFileChooser.setMultiSelectionEnabled(true);
jFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
if (jFileChooser.showOpenDialog(jFileChooser) == JFileChooser.APPROVE_OPTION) {
String p = jFileChooser.getSelectedFile().getPath();
FolderPath fPath = new FolderPath(p);
StringBuilder path = new StringBuilder(p).append("|");
for (File f : fPath.getFolders()) {
path.append(f.getPath()).append("|");
}
// 记录文件总的大小
long total = 0;
FileInputStream fis;
try {
for (File f : fPath.getFiles()) {
path.append(f.getPath()).append("*");
fis = new FileInputStream(f.getPath());
total += fis.available();
}
} catch (IOException ex) {