com.plumtree.openfoundation.util
Class XPSystem.In

java.lang.Object
  extended bycom.plumtree.openfoundation.util.XPSystem.In
Enclosing class:
XPSystem

public static class XPSystem.In
extends java.lang.Object

The "standard" input stream. This stream is already open and ready to supply input data. Typically this stream corresponds to keyboard input or another input source specified by the host environment or user.


Constructor Summary
XPSystem.In()
           
 
Method Summary
static XPReader GetReader()
          GetReader() exposes System.in as a Reader to match the .NET platform, in which Console.In is a TextReader.
static int Read()
          Reads the next byte of data from the input stream.
static java.lang.String ReadLine()
          Read a line of text from the standard input stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPSystem.In

public XPSystem.In()
Method Detail

Read

public static int Read()
Reads the next byte of data from the input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.

Returns:
the next byte of data, or -1 if the end of the stream is reached.
Throws:
XPIOException - if an I/O error occurs.

ReadLine

public static java.lang.String ReadLine()
Read a line of text from the standard input stream. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), or a carriage return followed immediately by a linefeed.

Returns:
A String containing the contents of the line, not including any line-termination characters, or null if the end of the stream has been reached
Throws:
XPIOException - If an I/O error occurs

GetReader

public static XPReader GetReader()
GetReader() exposes System.in as a Reader to match the .NET platform, in which Console.In is a TextReader.

Returns:
an Open Foundation stream reader instance wrapping the platform input stream.


Copyright 2002, 2003, 2004 Plumtree Software Inc. All Rights Reserved.