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

		if (GOOD_CHARS.indexOf(c) == -1) {
			return false;
		}
		if ((prefixEnabled && (charPosition < 2 || charPosition >= symbolSize)) ||
			(!prefixEnabled && (charPosition < 0 || charPosition >= symbolSize))) {
			return false;
		}

		int byteNo = getByteOffset(block, charPosition);
		index = index.add(BigInteger.valueOf(byteNo));

		byte b = block.getByte(index);
		char[] charArray = { c };
		byte cb = Byte.parseByte(new String(charArray), 16);

		if (charPosition % 2 == 0) {
			// its the high order byte
			b &= 0x0f;
			cb <<= 4;
			b += cb;
		}
		else {
			b &= 0xf0;
			b += cb;
		}
		block.setByte(index, b);
		return true;
	}
Overwrite a value in a ByteBlock.
@param block block to change
@param index byte index into the block
@param pos The position within the unit where c will be the
new character.
@param c new character to put at pos param
@return true if the replacement is legal, false if the
replacement value would not make sense for this format, e.g.
attempt to put a 'z' in a hex unit.
@throws ByteBlockAccessException if the block cannot be updated
@throws IndexOutOfBoundsException if index is not valid for the
block
Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/HexFormatModel.java