From 509881ea9f7a8b73315800011a60584675f11356 Mon Sep 17 00:00:00 2001 From: Project Nayuki Date: Sun, 7 Oct 2018 05:56:31 +0000 Subject: [PATCH] Slightly tweaked demo program for clarity. --- src/io/nayuki/fastqrcodegen/QrCodeGeneratorDemo.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/io/nayuki/fastqrcodegen/QrCodeGeneratorDemo.java b/src/io/nayuki/fastqrcodegen/QrCodeGeneratorDemo.java index 10ed286..f57836c 100644 --- a/src/io/nayuki/fastqrcodegen/QrCodeGeneratorDemo.java +++ b/src/io/nayuki/fastqrcodegen/QrCodeGeneratorDemo.java @@ -62,7 +62,8 @@ public final class QrCodeGeneratorDemo { ImageIO.write(img, "png", imgFile); // Write image to file String svg = qr.toSvgString(4); // Convert to SVG XML code - Files.write(new File("hello-world-QR.svg").toPath(), + File svgFile = new File("hello-world-QR.svg"); // File path for output + Files.write(svgFile.toPath(), // Write image to file svg.getBytes(StandardCharsets.UTF_8)); }