public ByteMatrix encode(String contents) throws WriterException {
  if (contents == null || contents.length() == 0) {
    throw new IllegalArgumentException("Found empty contents");
  }
  code=Encoder.encode(contents,ErrorCorrectionLevel.L);
  return renderResult(code,QR_CODE_ELEMENT_MULTIPLE);
}

public ByteMatrix encode ( String contents ) throws WriterException { if ( contents == null || contents . length ( ) == 0 ) { throw new IllegalArgumentException ( "Found empty contents" ) ; } code = Encoder . encode ( contents , ErrorCorrectionLevel . L ) ; return renderResult ( code , QR_CODE_ELEMENT_MULTIPLE ) ; }
this object renders a qr code as a bytematrix 2d array of greyscale values .
