Package scriptella.driver.text
Class ConsoleAdapters
java.lang.Object
scriptella.driver.text.ConsoleAdapters
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ReadergetConsoleReader(String charsetName) Returns the reader for System.in.static WritergetConsoleWriter(String charsetName) Returns the writer for System.out.
-
Constructor Details
-
ConsoleAdapters
public ConsoleAdapters()
-
-
Method Details
-
getConsoleReader
Returns the reader for System.in.- Parameters:
charsetName- charset name, can be null.- Returns:
- System.in reader.
- Throws:
UnsupportedEncodingException- if specified charset is unsupported
-
getConsoleWriter
Returns the writer for System.out.- Parameters:
charsetName- charset name, can be null.- Returns:
- System.out writer.
- Throws:
UnsupportedEncodingException- if specified charset is unsupported
-