FileDocCategorySizeDatePackage
ParallelPrint.javaAPI DocExample1124Sat Nov 25 12:55:36 GMT 2000None

ParallelPrint

public class ParallelPrint extends CommPortOpen
Print to a serial port using Java Communications.
author
Ian F. Darwin, ian@darwinsys.com

Fields Summary
protected static String
inputFileName
Constructors Summary
public ParallelPrint(Frame f)

		
		super(f);
	
Methods Summary
protected voidconverse()
Hold the (one-way) conversation.


		// Make a reader for the input file.
		BufferedReader file = new BufferedReader(
			new FileReader(inputFileName));

		String line;
		while ((line = file.readLine()) != null)
			os.println(line);

		// Finally, clean up.
		file.close();
		os.close();
	
public static voidmain(java.lang.String[] argv)


		if (argv.length != 1) {
			System.err.println("Usage: ParallelPrint filename");
			System.exit(1);
		}
		inputFileName = argv[0];

		new ParallelPrint(null).converse();

		System.exit(0);