public int read(char[] cbuf, int off, int len) {
		if (len == 0) return 0;
		if (buffer == null) {
			buffer = consoleModel.readLine();
			if (buffer == null) return -1;
			buffer += "\n";
		}
		if (len < buffer.length()) {
			buffer.getChars(0, len, cbuf, off);
			buffer = buffer.substring(len);
		} else {
			len = buffer.length();
			buffer.getChars(0, len, cbuf, off);
			buffer = null;
		}
		return len;
	}