@Override
	public int read() throws IOException {
		byte[] buffer = new byte[1];
		int bytesRead = read(buffer, 0, 1);
		return bytesRead == 1 ? Byte.toUnsignedInt(buffer[0]) : -1;
	}
Creates instance.

@param delegate {@link InputStream} to wrap
@param length expected length of the stream
@param errorConsumer consumer that will accept errors, if null Msg.error() will be used
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/FaultTolerantInputStream.java