iTextSharp.text.pdf.ByteBuffer.AppendHex C# (CSharp) Метод

AppendHex() публичный Метод

public AppendHex ( byte b ) : ByteBuffer
b byte
Результат ByteBuffer
        public ByteBuffer AppendHex(byte b)
        {
            Append(bytes[(b >> 4) & 0x0f]);
            return Append(bytes[b & 0x0f]);
        }

Usage Example

Пример #1
0
        public static PdfObject CreateInfoId(byte[] id, bool modified)
        {
            ByteBuffer buf = new ByteBuffer(90);

            buf.Append('[').Append('<');
            if (id.Length != 16)
            {
                id = CreateDocumentId();
            }
            for (int k = 0; k < 16; ++k)
            {
                buf.AppendHex(id[k]);
            }
            buf.Append('>').Append('<');
            if (modified)
            {
                id = CreateDocumentId();
            }
            for (int k = 0; k < 16; ++k)
            {
                buf.AppendHex(id[k]);
            }
            buf.Append('>').Append(']');
            buf.Close();
            return(new PdfLiteral(buf.ToByteArray()));
        }
All Usage Examples Of iTextSharp.text.pdf.ByteBuffer::AppendHex