コード例 #1
0
        public virtual void ReadTest()
        {
            String data = "/Name1 15";
            RandomAccessSourceFactory factory = new RandomAccessSourceFactory();
            PdfTokenizer tok = new PdfTokenizer(new RandomAccessFileOrArray(factory.CreateSource(data.GetBytes(iText.IO.Util.EncodingUtil.ISO_8859_1
                                                                                                               ))));

            byte[] read = new byte[] { (byte)tok.Read(), (byte)tok.Read(), (byte)tok.Read(), (byte)tok.Read(), (byte)tok
                                       .Read(), (byte)tok.Read(), (byte)tok.Read() };
            NUnit.Framework.Assert.AreEqual("/Name1 ", iText.IO.Util.JavaUtil.GetStringForBytes(read));
        }