@Override
	public int read() throws IOException {
		try {
			return buf.getByte((int) (streamPos++)) & 0xff;
		}
		catch (MemoryAccessException e) {
			streamPos--;
			return -1;
		}
	}
ImageInputStream for reading images that wraps a MemBuffer to get the bytes.  Adds a method
to find out how many bytes were read by the imageReader to read the image.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/MemBufferImageInputStream.java