iTextSharp.text.pdf.RandomAccessFileOrArray.ReadInt C# (CSharp) Метод

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

public ReadInt ( ) : int
Результат int
        public int ReadInt()
        {
            int ch1 = this.Read();
            int ch2 = this.Read();
            int ch3 = this.Read();
            int ch4 = this.Read();
            if ((ch1 | ch2 | ch3 | ch4) < 0)
                throw new EndOfStreamException();
            return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + ch4);
        }

Usage Example

Пример #1
0
        protected void CreateTableDirectory()
        {
            tableDirectory = new Dictionary <string, int[]>();
            rf.Seek(directoryOffset);
            int id = rf.ReadInt();

            if (id != 0x00010000)
            {
                throw new DocumentException(MessageLocalization.GetComposedMessage("1.is.not.a.true.type.file", fileName));
            }
            int num_tables = rf.ReadUnsignedShort();

            rf.SkipBytes(6);
            for (int k = 0; k < num_tables; ++k)
            {
                string tag           = ReadStandardString(4);
                int[]  tableLocation = new int[3];
                tableLocation[TABLE_CHECKSUM] = rf.ReadInt();
                tableLocation[TABLE_OFFSET]   = rf.ReadInt();
                tableLocation[TABLE_LENGTH]   = rf.ReadInt();
                tableDirectory[tag]           = tableLocation;
            }
        }
All Usage Examples Of iTextSharp.text.pdf.RandomAccessFileOrArray::ReadInt