Java tutorial
//package com.java2s; //License from project: Apache License import java.io.*; import javax.swing.*; public class Main { public static OutputStream out(final JTextArea ta) { return new OutputStream() { public void write(int b) throws IOException { ta.append(String.valueOf((char) b)); } }; } }