FileDocCategorySizeDatePackage
IndentContLineReaderTest.javaAPI DocExample1523Sun Feb 29 19:42:20 GMT 2004None

IndentContLineReaderTest

public class IndentContLineReaderTest extends TestCase
author
ian

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

		//junit.textui.TestRunner.run(IndentContLineReaderTest.suite());
	
public voidtestReading()


	     
		IndentContLineReader is = new IndentContLineReader(
			new StringReader(sampleTxt));
		String aLine;
		// Print Mail/News Header
		System.out.println("----- Message Header -----");
		while ((aLine = is.readLine()) != null && aLine.length() > 0) {
			System.out.println(is.getLineNumber() + ": " + aLine);
		}
		// Make "is" behave like normal BufferedReader
		is.setContinuationMode(false);
		System.out.println();
		// Print Message Body
		System.out.println("----- Message Body -----");
		while ((aLine = is.readLine()) != null) {
			System.out.println(is.getLineNumber() + ": " + aLine);
		}
		is.close();