FileDocCategorySizeDatePackage
CommPortDial.javaAPI DocExample1074Sun Apr 11 19:50:40 BST 2004None

CommPortDial

public class CommPortDial extends CommPortModem
Dial a phone using the Java Communications Package.
author
Ian F. Darwin, http://www.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);