Java: Сканер останавливается на новой линии

Я пытаюсь отсканировать текстовые файлы и добавить их на карту, карту и все работает.However, the scanner seems to be stopping when it comes to a 'enter' in the text file, or a blank line. This is my problem

вот мой блок кода для сканера / картографа

class OneButtonListener implements ActionListener
{
    @Override
    public void actionPerformed(ActionEvent evt)
    {
        final JFileChooser oneFC = new JFileChooser();
        oneFC.showOpenDialog(AnalysisFrame.this);
        String newLine = null;
        oneFC.getName(null);
        int returnVal = 0;
        File fileOne = oneFC.getSelectedFile();

        Scanner input = null;        
        try {
            input = new Scanner(fileOne);
        } 
        catch (FileNotFoundException ex) {
            Logger.getLogger(AnalysisFrame.class.getName()).log(Level.SEVERE, null,
                            ex);
        }                       
        inputText = input.nextLine(); 
        String[] words = inputText.split("[ \n\t\r,.;:!?(){}]");

        for(int i = 0; i < words.length; i++){
            key = words[i].toLowerCase(); 

            if (words[i].length() > 1){
                if (mapOne.get(key) == null){
                    mapOne.put(key, 1);
                }
                else {
                    value1 = mapOne.get(key).intValue();
                    value1++;
                    apOne.put(key, value1);
                }
            } 
         }
     }
}

Спасибо за любую помощь!

Ответы на вопрос(4)

Ваш ответ на вопрос