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();

}

}

[521 byte] By [bemmah] at [2007-9-26 3:33:24]
# 1
Check this article, maybe it helps... http://developer.java.sun.com/developer/Books/javaprogramming/cookbook/11.pdf
teemupii at 2007-6-29 12:01:52 > top of Java-index,Archived Forums,Java Programming...