Exemple #1
0
        internal virtual String getDecodedString(int[] blocks, int version, int numErrorCorrectionCode)
        {
            String dataString            = null;
            QRCodeDataBlockReader reader = new QRCodeDataBlockReader(blocks, version, numErrorCorrectionCode);

            try
            {
                dataString = reader.DataString;
            }
            catch (System.IndexOutOfRangeException e)
            {
                throw new InvalidDataBlockException(e.Message);
            }
            return(dataString);
        }
Exemple #2
0
        internal virtual sbyte[] getDecodedByteArray(int[] blocks, int version, int numErrorCorrectionCode)
        {
            sbyte[] byteArray;
            QRCodeDataBlockReader reader = new QRCodeDataBlockReader(blocks, version, numErrorCorrectionCode);

            try
            {
                byteArray = reader.DataByte;
            }
            catch (InvalidDataBlockException e)
            {
                throw e;
            }
            return(byteArray);
        }