outputing file contents to serial port
I have the code below that opens a file. I have method that opens the serial port. How do I pass the contents of the file to the serial port?
class SerialPortConnector extends JInternalFrame
{
JFileChooser fc = new JFileChooser();
int returnVal = fc.showOpenDialog(SerialPortConnector.this);
if (returnVal == JFileChooser.APPROVE_OPTION)
{File file = fc.getSelectedFile();
FileInputStream fis = new FileInputStream(file);
int b = fis.read();
}
}

