示例#1
0
文件: Util.cs 项目: thinhmascot/NPOI
        static void reader2_StreamReaded(object sender, POIFSReaderEventArgs e)
        {
            POIFile f = new POIFile();

            f.SetName(e.Name);
            f.SetPath(e.Path);
            Stream in1 = e.Stream;

            if (PropertySet.IsPropertySetStream(in1))
            {
                MemoryStream out1 =
                    new MemoryStream();
                Util.Copy(in1, out1);
                out1.Close();
                f.SetBytes(out1.ToArray());
                files.Add(f);
            }
        }
示例#2
0
文件: Util.cs 项目: zzy092/npoi
 public void ProcessPOIFSReaderEvent(POIFSReaderEvent evt)
 {
     try
     {
         POIFile f = new POIFile();
         f.SetName(evt.Name);
         f.SetPath(evt.Path);
         MemoryStream out1 =
             new MemoryStream();
         Util.Copy(evt.Stream, out1);
         out1.Close();
         f.SetBytes(out1.ToArray());
         files.Add(f);
     }
     catch (IOException ex)
     {
         throw new RuntimeException(ex.Message);
     }
 }
示例#3
0
文件: Util.cs 项目: thinhmascot/NPOI
 static void reader1_StreamReaded(object sender, POIFSReaderEventArgs e)
 {
     try
     {
         POIFile f = new POIFile();
         f.SetName(e.Name);
         f.SetPath(e.Path);
         Stream       in1  = e.Stream;
         MemoryStream out1 =
             new MemoryStream();
         Util.Copy(in1, out1);
         out1.Close();
         f.SetBytes(out1.ToArray());
         files.Add(f);
     }
     catch (IOException)
     {
         throw;
     }
 }
示例#4
0
文件: Util.cs 项目: zzy092/npoi
 public void ProcessPOIFSReaderEvent(POIFSReaderEvent e)
 {
     try
     {
         POIFile f = new POIFile();
         f.SetName(e.Name);
         f.SetPath(e.Path);
         Stream in1 = e.Stream;
         if (PropertySet.IsPropertySetStream(in1))
         {
             using (MemoryStream out1 = new MemoryStream())
             {
                 Util.Copy(in1, out1);
                 //out1.Close();
                 f.SetBytes(out1.ToArray());
                 files.Add(f);
             }
         }
     }
     catch (Exception ex)
     {
         throw new RuntimeException(ex);
     }
 }
示例#5
0
 public void ProcessPOIFSReaderEvent(POIFSReaderEvent e)
 {
     try
     {
         POIFile f = new POIFile();
         f.SetName(e.Name);
         f.SetPath(e.Path);
         Stream in1 = e.Stream;
         if (PropertySet.IsPropertySetStream(in1))
         {
             using (MemoryStream out1 = new MemoryStream())
             {
                 Util.Copy(in1, out1);
                 //out1.Close();
                 f.SetBytes(out1.ToArray());
                 files.Add(f);
             }
         }
     }
     catch (Exception ex)
     {
         throw new RuntimeException(ex);
     }
 }
示例#6
0
 public void ProcessPOIFSReaderEvent(POIFSReaderEvent evt)
 {
     try
     {
         POIFile f = new POIFile();
         f.SetName(evt.Name);
         f.SetPath(evt.Path);
         MemoryStream out1 =
             new MemoryStream();
         Util.Copy(evt.Stream, out1);
         out1.Close();
         f.SetBytes(out1.ToArray());
         files.Add(f);
     }
     catch (IOException ex)
     {
         throw new RuntimeException(ex.Message);
     }
 }