@Override
	public Object getValue(MemBuffer buf, Settings settings, int length) {

		int size = getLength();
		if (size <= 0) {
			return null;
		}

		byte[] bytes = new byte[size];
		if (buf.getBytes(bytes, 0) != size) {
			return null;
		}

		DataConverter dc = DataConverter.getInstance(ENDIAN.isBigEndian(settings, buf));

		if (size > 8) {
			return dc.getBigInteger(bytes, size, isSigned());
		}

		// Use long when possible
		long val = dc.getValue(bytes, size);
		return new Scalar(size * 8, val, isSigned());
	}
@return the C style data-type declaration for this data-type. Null is returned if no
        appropriate declaration exists.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/AbstractIntegerDataType.java