memorystream写入字节数组有问题

 FileStream fs = new FileStream("f://电子书//图片//1.jpg", FileMode.Open, FileAccess.Read);
        byte[] MyBinData = new byte[fs.Length];
        fs.Read(MyBinData, 0, System.Convert.ToInt32(fs.Length));

        mage.content.Write(MyBinData, 0, System.Convert.ToInt32(fs.Length));

        byte[] MyBinData1 = new byte[fs.Length];
        mage.content.Read(MyBinData1, 0, (int)fs.Length);

        FileStream fw = new FileStream("d://3.jpg",FileMode.Create);
        fw.Write(MyBinData1, 0, System.Convert.ToInt32(MyBinData1.Length));
        fw.Close();

 

                       filelen = m_Reader.GetInt32(6);
                        byte[] content1 = new byte[filelen];
                        m_Reader.GetBytes(5, 0, content1, 0, System.Convert.ToInt32(filelen));
                        content = content1; 

阅读更多
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页