Lets define an interface first. It is always a good idea to use interfaces when interacting with third-party components so that if you need to change the implementation altogether by using a different library, your change is isolated.
packageco.syntx.examples.qr;
importjava.io.OutputStream;
publicinterface IQRService {
/**
* Generate QR code of the specified content having the specified size.
* QRCode written to the output stream provided.
* @param size
* @param content
* @param outputStream
* @throws Exception
*/
publicabstractvoid generateQRCode(int width, int height, String content,