Ejemplo n.º 1
0
        public string ReadLine(
            )
        {
            text::StringBuilder buffer = new text::StringBuilder();

            try
            {
                while (true)
                {
                    int c = stream.ReadByte();
                    if (c == -1)
                    {
                        if (buffer.Length == 0)
                        {
                            return(null);
                        }
                        else
                        {
                            break;
                        }
                    }
                    else if (c == '\r' ||
                             c == '\n')
                    {
                        break;
                    }

                    buffer.Append((char)c);
                }
            }
            catch (IndexOutOfRangeException)
            {}
            return(buffer.ToString());
        }
Ejemplo n.º 2
0
        public override string ToString(
            )
        {
            text::StringBuilder buffer = new text::StringBuilder();

            {
                // Begin.
                buffer.Append("[ ");
                // Elements.
                foreach (PdfDirectObject item in items)
                {
                    buffer.Append(PdfDirectObject.ToString(item)).Append(" ");
                }
                // End.
                buffer.Append("]");
            }
            return(buffer.ToString());
        }
Ejemplo n.º 3
0
        public string ReadString(
            int length
            )
        {
            text::StringBuilder buffer = new text::StringBuilder();
            int c;

            while ((length--) > 0)
            {
                c = stream.ReadByte();
                if (c == -1)
                {
                    break;
                }

                buffer.Append((char)c);
            }

            return(buffer.ToString());
        }
Ejemplo n.º 4
0
        public override string ToString(
            )
        {
            text::StringBuilder buffer = new text::StringBuilder();

            {
                // Begin.
                buffer.Append("<< ");
                // Entries.
                foreach (KeyValuePair <PdfName, PdfDirectObject> entry in entries)
                {
                    // Entry...
                    // ...key.
                    buffer.Append(entry.Key.ToString()).Append(" ");
                    // ...value.
                    buffer.Append(PdfDirectObject.ToString(entry.Value)).Append(" ");
                }
                // End.
                buffer.Append(">>");
            }
            return(buffer.ToString());
        }
Ejemplo n.º 5
0
        public string ReadLine(
            )
        {
            text::StringBuilder buffer = new text::StringBuilder();

            try
            {
                while (true)
                {
                    int c = data[position++];
                    if (c == '\r' ||
                        c == '\n')
                    {
                        break;
                    }

                    buffer.Append((char)c);
                }
            }
            catch (IndexOutOfRangeException)
            { throw new EndOfStreamException(); }
            return(buffer.ToString());
        }
Ejemplo n.º 6
0
        public string ReadLine(
            )
        {
            if (position >= data.Length)
            {
                throw new EndOfStreamException();
            }

            text::StringBuilder buffer = new text::StringBuilder();

            while (position < data.Length)
            {
                int c = data[position++];
                if (c == '\r' ||
                    c == '\n')
                {
                    break;
                }

                buffer.Append((char)c);
            }
            return(buffer.ToString());
        }
Ejemplo n.º 7
0
        public string ReadString(
      int length
      )
        {
            text::StringBuilder buffer = new text::StringBuilder();
              int c;

              while((length--) > 0)
              {
            c = stream.ReadByte();
            if(c == -1)
              break;

            buffer.Append((char)c);
              }

              return buffer.ToString();
        }
Ejemplo n.º 8
0
        public string ReadLine(
      )
        {
            text::StringBuilder buffer = new text::StringBuilder();
              while(true)
              {
            int c = stream.ReadByte();
            if(c == -1)
              if(buffer.Length == 0)
            return null;
              else
            break;
            else if(c == '\r'
              || c == '\n')
              break;

            buffer.Append((char)c);
              }
              return buffer.ToString();
        }