public static File generate(String content, int width, int height, File targetFile) {
		String extName = FileUtil.extName(targetFile);
		switch (extName) {
			case QR_TYPE_SVG:
				String svg = generateAsSvg(content, new QrConfig(width, height));
				FileUtil.writeString(svg, targetFile, StandardCharsets.UTF_8);
				break;
			case QR_TYPE_TXT:
				String txt = generateAsAsciiArt(content, new QrConfig(width, height));
				FileUtil.writeString(txt, targetFile, StandardCharsets.UTF_8);
				break;
			default:
				final BufferedImage image = generate(content, width, height);
				ImgUtil.write(image, targetFile);
				break;
		}

		return targetFile;
	}
@Test
	@Disabled
	public void generateToStreamTest() {
		final QrConfig qrConfig = QrConfig.create()
				.setForeColor(Color.BLUE)
				.setBackColor(new Color(0,200,255))
				.setWidth(0)
				.setHeight(0).setMargin(1);
		final String filepath = "d:/test/qr_stream_to_txt.txt";
		try (final BufferedOutputStream outputStream = FileUtil.getOutputStream(filepath)) {
			QrCodeUtil.generate("https://hutool.cn/", qrConfig,"txt", outputStream);
		}catch (final IOException e){
			e.printStackTrace();
		}
		//final BufferedReader reader = FileUtil.getReader(filepath, StandardCharsets.UTF_8);
		//reader.lines().forEach(Console::log);
	}