private static Long getStoredOffset(MemBuffer buf, int size, boolean signed,
			Consumer<String> errorHandler) {
		byte[] bytes = new byte[size];
		int cnt = buf.getBytes(bytes, 0);
		if (cnt != size) {
			if (cnt != 0 && errorHandler != null) {
				errorHandler.accept("Insufficient data");
			}
			return null;
		}
		DataConverter converter = DataConverter.getInstance(buf.isBigEndian());
		if (signed) {
			return converter.getSignedValue(bytes, size);
		}
		return converter.getValue(bytes, size);
	}
Get an offset value based upon bytes stored at the specified buf
location.

@param buf         memory buffer and stored pointer location
@param size        store pointer size in bytes
@param signed      true if signed offset or false for unsigned
@return stored offset value or null if unusable buf or data
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/PointerDataType.java