FileDocCategorySizeDatePackage
PortTyper.javaAPI DocExample1322Wed Feb 15 09:24:14 GMT 2006None

PortTyper

public class PortTyper extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)


    if (args.length < 1) {
      System.out.println("Usage: java PortTyper portName");
      return;
    }

    try {    
      CommPortIdentifier com = CommPortIdentifier.getPortIdentifier(args[0]);
      CommPort thePort  = com.open("PortOpener", 10);
      CopyThread input = new CopyThread(System.in, thePort.getOutputStream());
      CopyThread output = new CopyThread(thePort.getInputStream(), System.out);
      input.start();
      output.start();
    }
    catch (Exception ex) {System.out.println(ex);}