public void write(char[] b, int off, int len) throws IOException {
			/* Note that setText and append are thread safe! */
			if (!initialized) {
				area.setText("");
				initialized = true;
			}
			String str = new String(b, off, len);
			StringBuffer sb = new StringBuffer(len);
			while (str != null && str.length() > 0) {
				if (lastCR && str.charAt(0) == '\n')
					str = str.substring(1);
				int crIndex = str.indexOf('\r');
				if (crIndex >= 0) {
					sb.append(str.substring(0, crIndex));
					sb.append("\n");
					str = str.substring(crIndex + 1);
					lastCR = true;
				} else {
					sb.append(str);
					str = null;
				}
			}
			area.append(sb.toString());
		}