@Override
	public boolean replaceValue(ByteBlock block, BigInteger index, int charPosition, char c)
			throws ByteBlockAccessException {

		if (charPosition < 0 || charPosition > symbolSize - 1) {
			// Not sure how this is possible, but...
			return false;
		}
		char[] charArray = { c };
		byte cb = Byte.parseByte(new String(charArray), 16);
		// get the correct byte offset based on position
		int byteOffset = getByteOffset(block, charPosition);
		index = index.add(BigInteger.valueOf(byteOffset));
		byte b = block.getByte(index);
		b = adjustByte(b, cb, charPosition);
		block.setByte(index, b);
		return true;
	}
Converts byte values to value represented as a 2, 4, 8, or 16-byte hex number.
Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/HexValueFormatModel.java