key0-96/
key0-96/doc/key/
key0-96/doc/key/credits/
key0-96/doc/key/developers/
key0-96/doc/key/developers/resources/
key0-96/setup/caves/
key0-96/setup/help/
key0-96/setup/ruins/
key0-96/src/
key0-96/src/commands/
key0-96/src/events/
key0-96/src/hack/
key0-96/src/sql/
key0-96/src/swing/
key0-96/src/talker/forest/
key0-96/src/talker/objects/
key0-96/src/terminals/
/*
**               j###t  ########## ####   ####
**              j###t   ########## ####   ####
**             j###T               "###L J###"
**          ######P'    ##########  #########
**          ######k,    ##########   T######T
**          ####~###L   ####
**          #### q###L  ##########   .#####
**          ####  \###L ##########   #####"
**
**  $Id$
**
**  Class History
**
**  Date        Name         Description
**  ---------|------------|-----------------------------------------------
**  19Aug98     subtle       start of recorded history
**
*/

package key;

import java.io.*;
import java.util.Stack;

/**
 */
public class ConsoleIC
extends DumbIC
{
	transient DataInputStream br;
	
	/**
	  *  The constructor must take a socket as its sole
	  *  argument
	  *
	  * @param s The socket that the connection is on
	 */
	public ConsoleIC()
	{
		super();
		setPrintStream( System.out );
		
		br = new DataInputStream( System.in );
	}
	
	public String getName()
	{
		return( "console" );
	}
	
	public final String getSiteName()
	{
		return( "local console" );
	}
	
	public String input( String prompt )
	{
		unIdle();
		
		ps.print( prompt );
		
		try
		{
			String s = br.readLine();
			if( s != null )
				return( s );
			else
				throw new IOException( "End Of File" );
		}
		catch( IOException e )
		{
			throw new NetworkException( e );
		}
	}
	
	public String hiddenInput( String prompt )
	{
		return( input( prompt ) );
	}
}