I havent had any programming experience with the package in question, though; i have done some research into it. Its only a new addition to the Java language, version 1.4 to be precise.
Your Input/Output requirements will be easily accomplished, also as the javax.comm API has support for IO via a subclass of the ever-popular Java IO Streams.
I found the following article which may be helpful: http://www.javaworld.com/javaworld/jw-05-1998/jw-05-javadev.html
By the way, please post all Java related questions in the 'Scripting - Other' forum.