This week's book giveaway is in the Flex forum. We're giving away four copies of Flex 4 in Action and have Tariq Ahmed, Dan Orlando, John C. Bland II & Joel Hooks on-line! See this thread for details.
COM port access is made through the javax.comm api.
The latest version of the comm api does not support Windows, so if you are on that platform your options are listed on our Java IO FAQ.
Have a look at the Java Tutorial for how to write to a file.