Changes since
the last release

com.ebay.sdk.helper
Class ConsoleUtil

java.lang.Object
  extended by com.ebay.sdk.helper.ConsoleUtil

public class ConsoleUtil
extends java.lang.Object

An easy interface to read numbers and strings from standard input

Version:
1.01 15 Feb 1996
Author:
Cay Horstmann. Modified by Weijun Li of eBay to make it to work on Linux

Constructor Summary
ConsoleUtil()
           
 
Method Summary
static void printPrompt(java.lang.String prompt)
          print a prompt on the console
static double readDouble(java.lang.String prompt)
          read a floating point number from the console.
static int readInt(java.lang.String prompt)
          read an integer from the console.
static java.lang.String readString()
          read a string from the console.
static java.lang.String readString(java.lang.String prompt)
          read a string from the console.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleUtil

public ConsoleUtil()
Method Detail

printPrompt

public static void printPrompt(java.lang.String prompt)
print a prompt on the console

Parameters:
prompt - the prompt string to display

readString

public static java.lang.String readString()
                                   throws java.io.IOException
read a string from the console. The string is terminated by a newline

Returns:
the input string (without the newline)
Throws:
java.io.IOException

readString

public static java.lang.String readString(java.lang.String prompt)
                                   throws java.io.IOException
read a string from the console. The string is terminated by a newline

Parameters:
prompt - the prompt string to display
Returns:
the input string (without the newline)
Throws:
java.io.IOException

readInt

public static int readInt(java.lang.String prompt)
                   throws java.io.IOException
read an integer from the console. The input is terminated by a newline

Parameters:
prompt - the prompt string to display
Returns:
the input value as an int
Throws:
java.lang.NumberFormatException - if bad input
java.io.IOException

readDouble

public static double readDouble(java.lang.String prompt)
                         throws java.io.IOException
read a floating point number from the console. The input is terminated by a newline

Parameters:
prompt - the prompt string to display
Returns:
the input value as a double
Throws:
java.lang.NumberFormatException - if bad input
java.io.IOException

Changes since
the last release

The information contained in this document is proprietary and confidential. Use of this information and the eBay API requires a Non-Disclosure Agreement (NDA) between the user and eBay Inc. For information regarding a qualifying NDA, contact Developer Relations: developer-relations@ebay.com
© 2004-2009 eBay Inc. All rights reserved.