com.github.croesch.micro_debug.commons
Class Reader

java.lang.Object
  extended by com.github.croesch.micro_debug.commons.Reader

public final class Reader
extends Object

The interface to read information from the console (or from the given Reader).

Since:
Date: Dec 3, 2011
Author:
croesch

Method Summary
static String readLine()
          Reads a line from the current Reader and returns it.
static void setReader(Reader reader)
          Sets the Reader to read the information from.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setReader

public static void setReader(Reader reader)
Sets the Reader to read the information from. Will be buffered internally, so don't need to be a BufferedReader.

Parameters:
reader - the new Reader for this component, not null.
Since:
Date: Dec 3, 2011

readLine

public static String readLine()
Reads a line from the current Reader and returns it. If an exception is thrown this will return null.

Returns:
the line read from the Reader or
null, if an IOException occurred.
Since:
Date: Dec 3, 2011


Copyright © 2012. All Rights Reserved.