scriptella.driver.text
Class ConsoleAdapters

java.lang.Object
  extended by scriptella.driver.text.ConsoleAdapters

public class ConsoleAdapters
extends java.lang.Object

Pre Java SE 6 adapters for System.in and System.out

TODO: Move this class to a spi.support.text package.

Version:
1.0
Author:
Fyodor Kupolov

Constructor Summary
ConsoleAdapters()
           
 
Method Summary
static java.io.Reader getConsoleReader(java.lang.String charsetName)
          Returns the reader for System.in.
static java.io.Writer getConsoleWriter(java.lang.String charsetName)
          Returns the writer for System.out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleAdapters

public ConsoleAdapters()
Method Detail

getConsoleReader

public static java.io.Reader getConsoleReader(java.lang.String charsetName)
                                       throws java.io.UnsupportedEncodingException
Returns the reader for System.in.

Parameters:
charsetName - charset name, can be null.
Returns:
System.in reader.
Throws:
java.io.UnsupportedEncodingException - if specified charset is unsupported

getConsoleWriter

public static java.io.Writer getConsoleWriter(java.lang.String charsetName)
                                       throws java.io.UnsupportedEncodingException
Returns the writer for System.out.

Parameters:
charsetName - charset name, can be null.
Returns:
System.out writer.
Throws:
java.io.UnsupportedEncodingException - if specified charset is unsupported


Copyright © Copyright 2006-2009 The Scriptella Project Team.