void reader3_StreamReaded(object sender, POIFSReaderEventArgs e) { try { PropertySetFactory.Create(e.Stream); } catch (Exception ex) { Assert.Fail(ex.Message); } }
void reader2_StreamReaded(object sender, POIFSReaderEventArgs e) { try { psa[0] = PropertySetFactory.Create(e.Stream); } catch { throw; /* FIXME (2): Replace the previous line by the following * one once we no longer need JDK 1.3 compatibility. */ // throw new RuntimeException(ex); } }
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); } }
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; } }