FileDocCategorySizeDatePackage
CommPortDial.javaAPI DocExample966Sat Nov 25 12:55:34 GMT 2000None

CommPortDial

public class CommPortDial extends CommPortModem
Dial a phone using the Java Communications Package.
author
Ian F. Darwin, ian@darwinsys.com

Fields Summary
protected static String
number
Constructors Summary
public CommPortDial()

		super(null);
	
Methods Summary
protected voidconverse()


		String resp;		// the modem response.

		// Send the reset command
		send("ATZ");

		expect("OK");

		send("ATDT" + number);

		expect("OK");

		try {
			Thread.sleep(5000);
		} catch (InterruptedException e) {
			// nothing to do
		}
		is.close();
		os.close();
	
public static voidmain(java.lang.String[] ap)


	    
		  
			 
		if (ap.length == 1)
			number = ap[0];
		new CommPortDial().converse();
		System.exit(0);