Discovering available comm ports

From Rxtx

(Difference between revisions)
Jump to: navigation, search
(Fucking spammers)
m
Line 1: Line 1:
-
This code snippet shows how to iretrive the available comms ports on your computer. A CommPort is available if it is not being used by another application. Note the differrence between the two examples is that the version for JDK 5.0 up uses [http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html generics]:
+
[http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=60 cheap adipex] [http://wc1.worldcrossing.com/WebX/.1de609ff real ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=75 cheap propecia] [http://wc1.worldcrossing.com/WebX/.1de609ee hydrocodone] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=241 sony ericsson ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=122 kyocera ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1367 didrex online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30338 free motorola ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2859 meridia online] [http://students.hsc.unt.edu/housing/item.cfm?type=2857 ativan online] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=57 buy propecia] [http://wc1.worldcrossing.com/WebX/.1de60a13 fioricet online] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=123 sagem ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1357 cheap levitra] [http://students.hsc.unt.edu/housing/item.cfm?type=2851 carisoprodol online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=42 order lorazepam] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=186 free jazz ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2915 mono ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=232 sony ringtones] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=81 free ringtones] [http://wc1.worldcrossing.com/WebX/.1de609fa free online pharmacy] [http://wc1.worldcrossing.com/WebX/.1de609e1 carisoprodol online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30314 buy pharmacy online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=219 viagra online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30337 free real ringtones] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=90 free punk ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30363 free sony ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3704 cheap lorazepam] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=58 cheap didrex] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=75 free qwest ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2917 free punk ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=146 buy zanaflex] [http://library.cshl.edu/wp/vb/member.php?u=1387 alltel ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=104 free real ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1352 buy norco] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=787 cyclobenzaprine] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=190 lisinopril online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=167 cheap carisoprodol] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=124 ericsson ringtones] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=79 buy zyban] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=217 punk ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=49 cheap phentermine] [http://students.hsc.unt.edu/housing/item.cfm?type=2881 cheap lisinopril] [http://wc1.worldcrossing.com/WebX/.1de60a0a online vicodin] [http://students.hsc.unt.edu/housing/item.cfm?type=2911 cingular ringtones] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=63 zanaflex online] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=78 cheap sildenafil] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=764 valium online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=62 cheap vigrx] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=111 norco online] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=82 cheap zoloft] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=70 pharmacy online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=53 cheap albuterol] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3726 free verizon ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a19 mp3 ringtones] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=786 order wellbutrin] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=824 free music ringtones] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=75 rivotril] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=69 lorazepam online] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=117 punk ringtones] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/wellbutrin_1082.htm wellbutrin online] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3724 free sprint ringtones] [http://wc1.worldcrossing.com/WebX/.1de609e7 diazepam online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30240 cheap carisoprodol] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=107 free music ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2873 nexium online] [http://students.hsc.unt.edu/housing/item.cfm?type=2887 pharmacy online online] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=89 order vigrx] [http://students.hsc.unt.edu/housing/item.cfm?type=2890 zanaflex] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=180 flexeril online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=201 nextel ringtones] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=38 paxil online] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=811 order hoodia] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=113 free sonyericsson ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2848 cheap soma] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/realringtones_1857.htm real ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3756 but lortab] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=81 music ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=198 free mtv ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1355 cheap clonazepam] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=103 free qwest ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3751 buy sildenafil] [http://wc1.worldcrossing.com/WebX/.1de60a29 tramadol online] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3702 paxil online] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=95 cheap hoodia] [http://wc1.worldcrossing.com/WebX/.1de60a04 sonyericsson ringtones] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=793 cheap sildenafil] [http://students.hsc.unt.edu/housing/item.cfm?type=2871 cheap wellbutrin] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=46 buy tramadol] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=82 verizon ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2923 free sony ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=68 ambien online] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=47 cheap soma] [http://library.cshl.edu/wp/vb/member.php?u=1374 free qwest ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30245 online cialis] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30346 free music ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a06 tenuate online] [http://students.hsc.unt.edu/housing/item.cfm?type=2855 buy diazepam] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3730 free punk ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=177 diethylpropion online] [http://students.hsc.unt.edu/housing/item.cfm?type=2907 sprint ringtones] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/vicodin_8272.htm vicodin online] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=141 buy vigrx] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/cialis_874.htm cialis online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=162 alltel ringtones] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=818 nextel ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2878 cheap sildenafil] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/norco_532.htm norco] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=113 paxil online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=76 free nextel ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a01 free sagem ringtones] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=25 buy xanax] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=230 free verizon ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3740 cialis online] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=111 cingular ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3738 xanax] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=770 diazepam online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30327 zyban online] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=48 cheap paxil] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/polyphonicringtones_8614.htm polyphonic ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=144 xanax online] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/cingularringtones_7013.htm free cingular ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=48 valium] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=821 motorola ringtones] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=41 viagra online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=71 free free ringtones] [http://wc1.worldcrossing.com/WebX/.1de609e5 cool ringtones] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=843 jazz ringtones] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=769 ultram online] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=80 free nokia ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=55 diazepam online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30351 sonyericsson ringtones] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=71 cheap lortab] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30333 free funny ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=216 zyban online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=234 sprint ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30264 but hydrocodone] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30366 free jazz ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30230 but adipex] [http://students.hsc.unt.edu/housing/item.cfm?type=2870 xenical online] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=82 diazepam online] [http://wc1.worldcrossing.com/WebX/.1de60a32 online zoloft] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/tracfoneringtones_5328.htm tracfone ringtones] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=800 cheap tenuate] [http://wc1.worldcrossing.com/WebX/.1de609f4 free mono ringtones] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=68 zyban online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=227 ultracet online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=88 mono ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30347 free verizon ringtones] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=773 cheap viagra] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=168 order celexa] [http://library.cshl.edu/wp/vb/member.php?u=1376 free motorola ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3699 meridia online] [http://wc1.worldcrossing.com/WebX/.1de60a03 sony ringtones] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=45 online vicodin] [http://students.hsc.unt.edu/housing/item.cfm?type=2854 ultram] [http://students.hsc.unt.edu/housing/item.cfm?type=2860 cheap adipex] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3711 cheap lisinopril] [http://wc1.worldcrossing.com/WebX/.1de609eb free funny ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3773 free kyocera ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=164 alprazolam online] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=816 funny ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=221 cheap vicodin] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=99 cheap lorazepam] [http://wc1.worldcrossing.com/WebX/.1de609ec buy hgh] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3765 samsung ringtones] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/carisoprodol_1193.htm carisoprodol online] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/lorazepam_17.htm lorazepam online] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=822 samsung ringtones] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/fioricet_7129.htm cheap fioricet] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30318 diethylpropion online] [http://library.cshl.edu/wp/vb/member.php?u=1370 free tracfone ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=65 online paxil] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=79 clomid online] [http://wc1.worldcrossing.com/WebX/.1de60a14 free jazz ringtones] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/clonazepam_4321.htm clonazepam online] [http://library.cshl.edu/wp/vb/member.php?u=1375 real ringtones] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=838 wwe ringtones] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=35 vicodin online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=193 cheap meridia] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=45 cyclobenzaprine] [http://library.cshl.edu/wp/vb/member.php?u=1365 ultracet online] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3695 cheap carisoprodol] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=142 wellbutrin online] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3700 online norco] [http://library.cshl.edu/wp/vb/member.php?u=1380 verizon ringtones] [http://wc1.worldcrossing.com/WebX/.1de609e0 cheap ativan] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30278 cheap nexium] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=206 cheap pharmacy online] [http://wc1.worldcrossing.com/WebX/.1de60a23 polyphonic ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3754 celexa online] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=129 free sony ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2882 cheap zoloft] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3775 jazz ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2916 free alltel ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=53 but fioricet] [http://wc1.worldcrossing.com/WebX/.1de609de cheap alprazolam] [http://wc1.worldcrossing.com/WebX/.1de60a0c buy wellbutrin] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3729 mono ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3697 cheap diazepam] This code snippet shows how to iretrive the available comms ports on your computer. A CommPort is available if it is not being used by another application. Note the differrence between the two examples is that the version for JDK 5.0 up uses [http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html generics]:
<b>JDK <= 1.4</b>
<b>JDK <= 1.4</b>

Revision as of 02:18, 22 July 2007

cheap adipex real ringtones cheap propecia hydrocodone sony ericsson ringtones kyocera ringtones didrex online free motorola ringtones meridia online ativan online buy propecia fioricet online sagem ringtones cheap levitra carisoprodol online order lorazepam free jazz ringtones mono ringtones sony ringtones free ringtones free online pharmacy carisoprodol online buy pharmacy online viagra online free real ringtones free punk ringtones free sony ringtones cheap lorazepam cheap didrex free qwest ringtones free punk ringtones buy zanaflex alltel ringtones free real ringtones buy norco cyclobenzaprine lisinopril online cheap carisoprodol ericsson ringtones buy zyban punk ringtones cheap phentermine cheap lisinopril online vicodin cingular ringtones zanaflex online cheap sildenafil valium online cheap vigrx norco online cheap zoloft pharmacy online cheap albuterol free verizon ringtones mp3 ringtones order wellbutrin free music ringtones rivotril lorazepam online punk ringtones wellbutrin online free sprint ringtones diazepam online cheap carisoprodol free music ringtones nexium online pharmacy online online order vigrx zanaflex flexeril online nextel ringtones paxil online order hoodia free sonyericsson ringtones cheap soma real ringtones but lortab music ringtones free mtv ringtones cheap clonazepam free qwest ringtones buy sildenafil tramadol online paxil online cheap hoodia sonyericsson ringtones cheap sildenafil cheap wellbutrin buy tramadol verizon ringtones free sony ringtones ambien online cheap soma free qwest ringtones online cialis free music ringtones tenuate online buy diazepam free punk ringtones diethylpropion online sprint ringtones vicodin online buy vigrx cialis online alltel ringtones nextel ringtones cheap sildenafil norco paxil online free nextel ringtones free sagem ringtones buy xanax free verizon ringtones cialis online cingular ringtones xanax diazepam online zyban online cheap paxil polyphonic ringtones xanax online free cingular ringtones valium motorola ringtones viagra online free free ringtones cool ringtones jazz ringtones ultram online free nokia ringtones diazepam online sonyericsson ringtones cheap lortab free funny ringtones zyban online sprint ringtones but hydrocodone free jazz ringtones but adipex xenical online diazepam online online zoloft tracfone ringtones cheap tenuate free mono ringtones zyban online ultracet online mono ringtones free verizon ringtones cheap viagra order celexa free motorola ringtones meridia online sony ringtones online vicodin ultram cheap adipex cheap lisinopril free funny ringtones free kyocera ringtones alprazolam online funny ringtones cheap vicodin cheap lorazepam buy hgh samsung ringtones carisoprodol online lorazepam online samsung ringtones cheap fioricet diethylpropion online free tracfone ringtones online paxil clomid online free jazz ringtones clonazepam online real ringtones wwe ringtones vicodin online cheap meridia cyclobenzaprine ultracet online cheap carisoprodol wellbutrin online online norco verizon ringtones cheap ativan cheap nexium cheap pharmacy online polyphonic ringtones celexa online free sony ringtones cheap zoloft jazz ringtones free alltel ringtones but fioricet cheap alprazolam buy wellbutrin mono ringtones cheap diazepam This code snippet shows how to iretrive the available comms ports on your computer. A CommPort is available if it is not being used by another application. Note the differrence between the two examples is that the version for JDK 5.0 up uses generics:

JDK <= 1.4

   /**
     * @return    A HashSet containing the CommPortIdentifier for all serial ports that are not currently being used.
     */
    public static HashSet getAvailableSerialPorts() {
        HashSet h = new HashSet();
        Enumeration thePorts = CommPortIdentifier.getPortIdentifiers();
        while (thePorts.hasMoreElements()) {
            CommPortIdentifier com = (CommPortIdentifier) thePorts.nextElement();
            switch (com.getPortType()) {
            case CommPortIdentifier.PORT_SERIAL:
                try {
                    CommPort thePort = com.open("CommUtil", 50);
                    thePort.close();
                    h.add(com);
                } catch (PortInUseException e) {
                    if (log.isInfoEnabled()) {
                        log.info("Port, "   com.getName()   ", is in use.");
                    }
                } catch (Exception e) {
                    if (log.isErrorEnabled()) {
                        log.error("Failed to open port "   com.getName(), e);
                    }
                }
            }
        }
        return h;
    }

JDK >= 5.0

   /**
     * @return    A HashSet containing the CommPortIdentifier for all serial ports that are not currently being used.
     */
    public static HashSet<CommPortIdentifier> getAvailableSerialPorts() {
        HashSet<CommPortIdentifier> h = new HashSet<CommPortIdentifier>();
        Enumeration thePorts = CommPortIdentifier.getPortIdentifiers();
        while (thePorts.hasMoreElements()) {
            CommPortIdentifier com = (CommPortIdentifier) thePorts.nextElement();
            switch (com.getPortType()) {
            case CommPortIdentifier.PORT_SERIAL:
                try {
                    CommPort thePort = com.open("CommUtil", 50);
                    thePort.close();
                    h.add(com);
                } catch (PortInUseException e) {
                    if (log.isInfoEnabled()) {
                        log.info("Port, "   com.getName()   ", is in use.");
                    }
                } catch (Exception e) {
                    if (log.isErrorEnabled()) {
                        log.error("Failed to open port "   com.getName(), e);
                    }
                }
            }
        }
        return h;
    }
Personal tools