public InputStream getInputStream() throws IOException {
		if (this.output instanceof BetterByteArrayOutputStream os) {
			return os.getInputStream();
		}
		if (!this.closed) {
			super.flush();
			super.close();
			this.closed = true;
		}

		return new BufferedInputStream(new FileInputStream(this.outFile));
	}
Closes the output stream and creates an InputStream on the same data.

@return either a BetterByteArrayOutputStream or buffered FileInputStream,
        depending on what state we are in.
src/main/java/de/gessnerfl/fakesmtp/smtp/io/DeferredFileOutputStream.java