// Demonstrate readLine()
import java.io.*;

class ReadLines
{
	public static void main( String args[] )
		throws IOException
	{
		// Create a DataInputStream using System.in
		DataInputStream inData = new DataInputStream( System.in );
		String	str;

		System.out.println("Enter lines of text.");
		System.out.println("Enter 'stop' to quit.");
		do
		{
			str = inData.readLine();
			System.out.println(str);
		} while( !str.equals("stop"));
	}
}
