JavaTM Communications API (http://java.sun.com/products/javacomm/index.html)The JavaTM Communications API can be used to write platform-independent communications applications for technologies such as voice mail, fax, and smartcards. This version of the Java Communications API contains support for RS232 serial ports and IEEE 1284 parallel ports. With updated functionality, one can: 1 Enumerate ports available on the system. 2 Open and claim ownership of ports. 3 Resolve port ownership contention between multiple applications. 4 Perform asynchronous and synchronous I/O on ports. 5 Receive Beans-style events describing communication port state changes.
IBM javax-usb Open Source Project http://www-124.ibm.com/developerworks/projects/javaxusbThis project is to create a Java API standard to access the Universal Serial Bus, javax.USB. It is part of the Java Community Process: JSR 80, and will include a Linux implemention.
2 Open and claim ownership of ports.
3 Resolve port ownership contention between multiple applications.
4 Perform asynchronous and synchronous I/O on ports.
5 Receive Beans-style events describing communication port state changes.
http://www-124.ibm.com/developerworks/projects/javaxusbThis project is to create a Java API standard to access the Universal Serial Bus, javax.USB. It is part of the Java Community Process: JSR 80, and will include a Linux implemention.
而且并口也行,参考一下这方面的书吧。
当然能跨平台;
至于效率,参考其它语言试试把,我也没用过。