1. 程式人生 > >檔案傳輸之判斷檔案的型別

檔案傳輸之判斷檔案的型別

JFileChooser chooser = new JFileChooser();
File f = new File(path);
contentType = chooser.getTypeDescription(f);