I need to make a backup copy of a selectedfile, while using JfileChooser so that the user can specify/or select the name for the back up file. I have to use DataInputStream and DataOutputStream and the readByte and writeByte methods for this process.
Here is what i have so far:
public class BasicFile {
public BasicFile() throws FileNotFoundException, IOException{
JFileChooser chooser = new JFileChooser();
chooser.showOpenDialog(null);
File f = chooser.getSelectedFile();
if (f.isFile())
{
DataInputStream dis = new DataInputStream(new FileInputStream(f));
}
}
}