输出字符缓冲区太小,无法包含已解码的字符

时间:2016-02-15 21:04:18

标签: c#

我正在尝试使用c#从二进制文件中读取数据 这些数据是使用代码输入的,但我得到了这个例外

FileStream fs = new FileStream(path,FileMode.Open);
                FileStream fs2 = new FileStream(path2, FileMode.CreateNew);
                BinaryReader br = new BinaryReader(fs);

                BinaryWriter bw = new BinaryWriter(fs2);
                while (br.PeekChar() != -1) 
                {
                    bw.Write(br.ReadInt32());
                    bw.Write(br.ReadString());
                }
                bw.Close();
                br.Close();

                fs2.Close();
                fs.Close();

以下是代码:

CREATE OR REPLACE PACKAGE PACKFACE IS
TYPE LIST_IDS IS TABLE OF INT INDEX BY BINARY_INTEGER;
PROCEDURE P_SELECT_IDBFRIENDS (CONSULTA OUT SYS_REFCURSOR,COD_US IN INT,IDS_NOT IN LIST_IDS);
END;

例外是在peekChar行

0 个答案:

没有答案