I want to save selected text file as html file
i have written following code

JFrame parentFrame = new JFrame();

                    JFileChooser fileChooser = new JFileChooser();
                    fileChooser.setDialogTitle("Specify a file to save");    

                    int userSelection = fileChooser.showSaveDialog(parentFrame);

                    if (userSelection == JFileChooser.APPROVE_OPTION) {
                        File fileToSave = fileChooser.getSelectedFile();

                        System.out.println("Save as file: " + fileToSave.getAbsolutePath());

                now to save actualy text into destination folder what else should i write