FileDocCategorySizeDatePackage
PortTyper.javaAPI DocExample1342Sun Mar 28 19:09:40 BST 1999None

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 e) {
      System.out.println(e);
    }