public void ingestStreamToNextTerminator(InputStream stream) throws IOException {
		int tok = stream.read();
		if (tok <= 0) {
			return;
		}
		for (;;) {
			if (byteCount > maxCount) {
				throw new IOException("Response buffer size exceeded for: " + description);
			}
			do {
				if (currentPos == BUFFER_SIZE) {
					break;
				}
				currentBuffer.array[currentPos++] = (byte) tok;
				tok = stream.read();
			}
			while (tok > 0);
			byteCount += currentPos;
			if (tok <= 0) {
				return;		// Reached terminator or end of stream, ingest is finished
			}
			// Set up next buffer
			currentBuffer.next = new ArrayIter();
			currentBuffer = currentBuffer.next;
			currentBuffer.array = new byte[BUFFER_SIZE];
			currentPos = 0;
		}
	}
Ingest stream up to the first 0 byte or until maxCount bytes is reached.
Store the bytes on the heap in BUFFER_SIZE chunks.
@param stream is the input
@throws IOException for errors reading from the stream
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/LinkedByteBuffer.java