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); } }
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); } }
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; } }
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); } }