Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.qiita.nimzo6689.snippet.qrgen.schema;
- import net.glxn.qrgen.core.scheme.EMail;
- import net.glxn.qrgen.javase.QRCode;
- import java.io.File;
- import java.nio.file.Files;
- import java.nio.file.Paths;
- import java.nio.file.StandardCopyOption;
- public class QRGenForEmail {
- public static void main(String[] args) throws Exception {
- EMail email = EMail.parse("mailto:taro.sato@example.com");
- File qrCode = QRCode.from(email).file();
- Files.copy(qrCode.toPath(), Paths.get("qrcode.png"), StandardCopyOption.REPLACE_EXISTING);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement