@Override
	public long readSignedIntegerExpectString(String expect, long expectval)
			throws DecoderException {
		long res;
		LinkedByteBuffer.Position tmpPos = new LinkedByteBuffer.Position();
		tmpPos.buffer = inStream;
		tmpPos.copy(curPos);
		byte header1 = tmpPos.getNextByte();
		if ((header1 & HEADEREXTEND_MASK) != 0) {
			tmpPos.getNextByte();
		}
		byte typeByte = tmpPos.getNextByte();
		int typeCode = typeByte >> TYPECODE_SHIFT;
		if (typeCode == TYPECODE_STRING) {
			String val = readString();
			if (!val.equals(expect)) {
				throw new DecoderException(
					"Expecting string \"" + expect + "\" but read \"" + val + "\"");
			}
			res = expectval;
		}
		else {
			res = readSignedInteger();
		}
		return res;
	}
Close stream cached by the ingestStreamAsNeeded method.
@throws IOException for low-level problems with the stream
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/PackedDecode.java