/** * writes a representation of the QR code to the supplied {@link OutputStream} * * @param stream the {@link OutputStream} to write QR Code to */ public void writeTo(OutputStream stream) { try { writeToStream(stream); } catch (Exception e) { throw new QRGenerationException("Failed to create QR image from text due to underlying exception", e); } }
/** * returns a {@link ByteArrayOutputStream} representation of the QR code * * @return qrcode as stream */ public ByteArrayOutputStream stream() { ByteArrayOutputStream stream = new ByteArrayOutputStream(); try { writeToStream(stream); } catch (Exception e) { throw new QRGenerationException("Failed to create QR image from text due to underlying exception", e); } return stream; }
/** * writes a representation of the QR code to the supplied {@link OutputStream} * * @param stream the {@link OutputStream} to write QR Code to */ public void writeTo(OutputStream stream) { try { writeToStream(stream); } catch (Exception e) { throw new QRGenerationException("Failed to create QR image from text due to underlying exception", e); } }
/** * writes a representation of the QR code to the supplied {@link OutputStream} * * @param stream the {@link OutputStream} to write QR Code to */ public void writeTo(OutputStream stream) { try { writeToStream(stream); } catch (Exception e) { throw new QRGenerationException("Failed to create QR image from text due to underlying exception", e); } }
/** * returns a {@link ByteArrayOutputStream} representation of the QR code * * @return qrcode as stream */ public ByteArrayOutputStream stream() { ByteArrayOutputStream stream = new ByteArrayOutputStream(); try { writeToStream(stream); } catch (Exception e) { throw new QRGenerationException("Failed to create QR image from text due to underlying exception", e); } return stream; }
/** * returns a {@link ByteArrayOutputStream} representation of the QR code * * @return qrcode as stream */ public ByteArrayOutputStream stream() { ByteArrayOutputStream stream = new ByteArrayOutputStream(); try { writeToStream(stream); } catch (Exception e) { throw new QRGenerationException("Failed to create QR image from text due to underlying exception", e); } return stream; }