<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://rxtx.qbang.org/wiki/skins/common/feed.css?207"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://rxtx.qbang.org/wiki/index.php?feed=atom&amp;target=LichiRacch&amp;title=Special%3AContributions</id>
		<title>Rxtx - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://rxtx.qbang.org/wiki/index.php?feed=atom&amp;target=LichiRacch&amp;title=Special%3AContributions"/>
		<link rel="alternate" type="text/html" href="http://rxtx.qbang.org/wiki/index.php/Special:Contributions/LichiRacch"/>
		<updated>2026-08-14T10:09:44Z</updated>
		<subtitle>From Rxtx</subtitle>
		<generator>MediaWiki 1.15.4</generator>

	<entry>
		<id>http://rxtx.qbang.org/wiki/index.php/Discovering_available_comm_ports</id>
		<title>Discovering available comm ports</title>
		<link rel="alternate" type="text/html" href="http://rxtx.qbang.org/wiki/index.php/Discovering_available_comm_ports"/>
				<updated>2009-01-08T16:03:45Z</updated>
		
		<summary type="html">&lt;p&gt;LichiRacch:&amp;#32;http://zelzelqa.is-the-boss.com/news-microsoft-reader-2009-01-01.html&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://zelzelqa.is-the-boss.com/news-microsoft-reader-2009-01-01.html microsoft reader activation active x] [http://saererg.0lx.net/20081109-animal-intercourse.htm animal intercourse videos] [http://cnavieltz.strefa.pl/comment-1316.htm agnus of god movie] [http://caraines.qsh.eu/cnalar.htm prime video stores] [http://varpasz.is-the-boss.com/article576.htm mv torrents] &lt;br /&gt;
[http://roladarh.strefa.pl/news-1919.html new realises movies] [http://vihencbr.0lx.net/sony-psp-movie.html sony psp movie image converter 2.1] [http://acsitzar.0lx.net/news-eureekas-castle-2008-11-11.html eureekas castle videos] [http://ettaelt.strefa.pl/news-1304.html kitty fox movies] [http://naceceli.qsh.eu/page439.html regal movie] &lt;br /&gt;
rocalmo&lt;br /&gt;
trlidel&lt;br /&gt;
This code snippet shows how to retrieve the available comms ports on your computer. A CommPort is available if it is not being used by another application. Note the difference 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]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;JDK &amp;lt;= 1.4&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   /**&lt;br /&gt;
     * @return    A HashSet containing the CommPortIdentifier for all serial ports that are not currently being used.&lt;br /&gt;
     */&lt;br /&gt;
    public static HashSet getAvailableSerialPorts() {&lt;br /&gt;
        HashSet h = new HashSet();&lt;br /&gt;
        Enumeration thePorts = CommPortIdentifier.getPortIdentifiers();&lt;br /&gt;
        while (thePorts.hasMoreElements()) {&lt;br /&gt;
            CommPortIdentifier com = (CommPortIdentifier) thePorts.nextElement();&lt;br /&gt;
            switch (com.getPortType()) {&lt;br /&gt;
            case CommPortIdentifier.PORT_SERIAL:&lt;br /&gt;
                try {&lt;br /&gt;
                    CommPort thePort = com.open(&amp;quot;CommUtil&amp;quot;, 50);&lt;br /&gt;
                    thePort.close();&lt;br /&gt;
                    h.add(com);&lt;br /&gt;
                } catch (PortInUseException e) {&lt;br /&gt;
                    System.out.println(&amp;quot;Port, &amp;quot;  + com.getName() +  &amp;quot;, is in use.&amp;quot;);&lt;br /&gt;
                } catch (Exception e) {&lt;br /&gt;
                    System.err.println(&amp;quot;Failed to open port &amp;quot; + com.getName());&lt;br /&gt;
                    e.printStackTrace();&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        return h;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;JDK &amp;gt;= 5.0&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   /**&lt;br /&gt;
     * @return    A HashSet containing the CommPortIdentifier for all serial ports that are not currently being used.&lt;br /&gt;
     */&lt;br /&gt;
    public static HashSet&amp;lt;CommPortIdentifier&amp;gt; getAvailableSerialPorts() {&lt;br /&gt;
        HashSet&amp;lt;CommPortIdentifier&amp;gt; h = new HashSet&amp;lt;CommPortIdentifier&amp;gt;();&lt;br /&gt;
        Enumeration thePorts = CommPortIdentifier.getPortIdentifiers();&lt;br /&gt;
        while (thePorts.hasMoreElements()) {&lt;br /&gt;
            CommPortIdentifier com = (CommPortIdentifier) thePorts.nextElement();&lt;br /&gt;
            switch (com.getPortType()) {&lt;br /&gt;
            case CommPortIdentifier.PORT_SERIAL:&lt;br /&gt;
                try {&lt;br /&gt;
                    CommPort thePort = com.open(&amp;quot;CommUtil&amp;quot;, 50);&lt;br /&gt;
                    thePort.close();&lt;br /&gt;
                    h.add(com);&lt;br /&gt;
                } catch (PortInUseException e) {&lt;br /&gt;
                    System.out.println(&amp;quot;Port, &amp;quot;  + com.getName() + &amp;quot;, is in use.&amp;quot;);&lt;br /&gt;
                } catch (Exception e) {&lt;br /&gt;
                    System.err.println(&amp;quot;Failed to open port &amp;quot; +  com.getName());&lt;br /&gt;
                    e.printStackTrace();&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        return h;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>LichiRacch</name></author>	</entry>

	<entry>
		<id>http://rxtx.qbang.org/wiki/index.php/Discovering_available_comm_ports</id>
		<title>Discovering available comm ports</title>
		<link rel="alternate" type="text/html" href="http://rxtx.qbang.org/wiki/index.php/Discovering_available_comm_ports"/>
				<updated>2008-12-20T02:17:00Z</updated>
		
		<summary type="html">&lt;p&gt;LichiRacch:&amp;#32;varalac&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;rocalmo&lt;br /&gt;
trlidel&lt;br /&gt;
This code snippet shows how to retrieve the available comms ports on your computer. A CommPort is available if it is not being used by another application. Note the difference 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]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;JDK &amp;lt;= 1.4&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   /**&lt;br /&gt;
     * @return    A HashSet containing the CommPortIdentifier for all serial ports that are not currently being used.&lt;br /&gt;
     */&lt;br /&gt;
    public static HashSet getAvailableSerialPorts() {&lt;br /&gt;
        HashSet h = new HashSet();&lt;br /&gt;
        Enumeration thePorts = CommPortIdentifier.getPortIdentifiers();&lt;br /&gt;
        while (thePorts.hasMoreElements()) {&lt;br /&gt;
            CommPortIdentifier com = (CommPortIdentifier) thePorts.nextElement();&lt;br /&gt;
            switch (com.getPortType()) {&lt;br /&gt;
            case CommPortIdentifier.PORT_SERIAL:&lt;br /&gt;
                try {&lt;br /&gt;
                    CommPort thePort = com.open(&amp;quot;CommUtil&amp;quot;, 50);&lt;br /&gt;
                    thePort.close();&lt;br /&gt;
                    h.add(com);&lt;br /&gt;
                } catch (PortInUseException e) {&lt;br /&gt;
                    System.out.println(&amp;quot;Port, &amp;quot;  + com.getName() +  &amp;quot;, is in use.&amp;quot;);&lt;br /&gt;
                } catch (Exception e) {&lt;br /&gt;
                    System.err.println(&amp;quot;Failed to open port &amp;quot; + com.getName());&lt;br /&gt;
                    e.printStackTrace();&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        return h;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;JDK &amp;gt;= 5.0&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   /**&lt;br /&gt;
     * @return    A HashSet containing the CommPortIdentifier for all serial ports that are not currently being used.&lt;br /&gt;
     */&lt;br /&gt;
    public static HashSet&amp;lt;CommPortIdentifier&amp;gt; getAvailableSerialPorts() {&lt;br /&gt;
        HashSet&amp;lt;CommPortIdentifier&amp;gt; h = new HashSet&amp;lt;CommPortIdentifier&amp;gt;();&lt;br /&gt;
        Enumeration thePorts = CommPortIdentifier.getPortIdentifiers();&lt;br /&gt;
        while (thePorts.hasMoreElements()) {&lt;br /&gt;
            CommPortIdentifier com = (CommPortIdentifier) thePorts.nextElement();&lt;br /&gt;
            switch (com.getPortType()) {&lt;br /&gt;
            case CommPortIdentifier.PORT_SERIAL:&lt;br /&gt;
                try {&lt;br /&gt;
                    CommPort thePort = com.open(&amp;quot;CommUtil&amp;quot;, 50);&lt;br /&gt;
                    thePort.close();&lt;br /&gt;
                    h.add(com);&lt;br /&gt;
                } catch (PortInUseException e) {&lt;br /&gt;
                    System.out.println(&amp;quot;Port, &amp;quot;  + com.getName() + &amp;quot;, is in use.&amp;quot;);&lt;br /&gt;
                } catch (Exception e) {&lt;br /&gt;
                    System.err.println(&amp;quot;Failed to open port &amp;quot; +  com.getName());&lt;br /&gt;
                    e.printStackTrace();&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        return h;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>LichiRacch</name></author>	</entry>

	</feed>