private static BitMatrix matrixFromString(String uri, int width, int height) {
        Writer qrWriter = new QRCodeWriter();
        BitMatrix matrix;
        try {
            matrix = qrWriter.encode(uri, BarcodeFormat.QR_CODE, width, height);
        } catch (WriterException e) {
            throw new RuntimeException(e);
        }
        return matrix;
    }
private static BitMatrix matrixFromString ( String uri , int width , int height ) { Writer qrWriter = new QRCodeWriter ( ) ; BitMatrix matrix ; try { matrix = qrWriter . encode ( uri , BarcodeFormat . QR_CODE , width , height ) ; } catch ( WriterException e ) { throw new RuntimeException ( e ) ; } return matrix ; }
Create a BitMatrix from a Bitcoin URI
@param uri Bitcoin URI
@return A BitMatrix for the QRCode for the URI