@Override
	public void handleChar(byte b) throws Exception {
		bb.put(b);
		bb.flip();
		CoderResult result = decoder.decode(bb, cb, false);
		if (result.isError()) {
			Msg.error(this, "Error while decoding: " + dumpBuf(bb));
			decoder.reset();
			bb.clear();
		}
		else {
			bb.compact();
		}
		cb.flip();
		while (cb.hasRemaining()) {
			try {
				// A little strange using both unicode and vt charsets....
				buffer.putChar(curVtCharset.mapChar(cb.get()));
				buffer.moveCursorRight(1, true, showCursor);
			}
			catch (Throwable t) {
				Msg.error(this, "Error handling character: " + t, t);
			}
		}
		cb.clear();
	}
Create a model

@param panel the panel to receive commands from the model's VT/ANSI parser
@param charset the charset for decoding bytes to characters
@param metrics font metrics for the monospaced terminal font
@param fontSizeAdjustment the font size adjustment
@param colors a resolver for ANSI colors
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/terminal/TerminalLayoutModel.java