iTextSharp.text.pdf.qrcode.ByteArray.Set C# (CSharp) Method

Set() public method

public Set ( byte source, int offset, int count ) : void
source byte
offset int
count int
return void
        public void Set(byte[] source, int offset, int count) {
            bytes = new byte[count];
            size = count;
            for (int x = 0; x < count; x++) {
                bytes[x] = source[offset + x];
            }
        }

Same methods

ByteArray::Set ( int index, int value ) : void

Usage Example

コード例 #1
0
        private static ByteArray GenerateECBytes(ByteArray dataBytes, int numEcBytesInBlock)
        {
            var numDataBytes = dataBytes.Size();
            var toEncode     = new int[numDataBytes + numEcBytesInBlock];

            for (var i = 0; i < numDataBytes; i++)
            {
                toEncode[i] = dataBytes.At(i);
            }
            new ReedSolomonEncoder(GF256.QR_CODE_FIELD).Encode(toEncode, numEcBytesInBlock);

            var ecBytes = new ByteArray(numEcBytesInBlock);

            for (var i = 0; i < numEcBytesInBlock; i++)
            {
                ecBytes.Set(i, toEncode[numDataBytes + i]);
            }
            return(ecBytes);
        }
All Usage Examples Of iTextSharp.text.pdf.qrcode.ByteArray::Set