Is there a "file-like" serial port interface in Java8 under Windows (recent, 7 or 8)

145 views Asked by At

I'm using the following code under Java8 for MacOS X:

new BufferedReader(new FileReader("/dev/cu.usbserial-A601EQIH"))
    .lines()
    .forEach(System.out::println);

Provided:

  • there is a VCP driver from FTDI installed
  • there is an FTDI usb-serial device plugged-in and sending data to computer, line by line

Then:

  • this code will iterate the lines sent and print them on the console.

Is there such a "/dev/cu.usbserial-A601EQIH" file on Windows, provided we install the right virtual com port drivers? I have no windows machine to try it, and would like to answer that question before I show off that code at a conference...

PS: As is implied by code, I do not want to use any library apart standard Java8 libraries.

0

There are 0 answers