bool isStream = false; // whether the file is passed in with stream, no means passed in with string path /** * Constructor. Creates a new ZipPackage. */ public ZipPackage() : base(defaultPackageAccess) { this.zipArchive = null; try { this.contentTypeManager = new ZipContentTypeManager(null, this); } catch (InvalidFormatException e) { } }
/** * Constructor. Creates a new ZipPackage. */ public ZipPackage() : base(defaultPackageAccess) { this.zipArchive = null; try { this.contentTypeManager = new ZipContentTypeManager(null, this); } catch (InvalidFormatException e) { } }
/** * Constructor. Opens a Zip based Open XML document. * * @param path * The path of the file to open or create. * @param access * The package access mode. * @throws InvalidFormatException * If the content type part parsing encounters an error. */ public ZipPackage(String path, PackageAccess access) : base(access) { ZipFile zipFile = ZipHelper.OpenZipFile(path); if (zipFile == null) throw new InvalidOperationException( "Can't open the specified file: '" + path + "'"); this.zipArchive = new ZipFileZipEntrySource(zipFile); }
/** * Constructor. Opens a Zip based Open XML document. * * @param path * The path of the file to open or create. * @param access * The package access mode. * @throws InvalidFormatException * If the content type part parsing encounters an error. */ public ZipPackage(String path, PackageAccess access) : base(access) { ZipFile zipFile = ZipHelper.OpenZipFile(path); if (zipFile == null) { throw new InvalidOperationException( "Can't open the specified file: '" + path + "'"); } this.zipArchive = new ZipFileZipEntrySource(zipFile); }
bool isStream = false; // whether the file is passed in with stream, no means passed in with string path /** * Constructor. Creates a new ZipPackage. */ public ZipPackage() : base(defaultPackageAccess) { this.zipArchive = null; try { this.contentTypeManager = new ZipContentTypeManager(null, this); } // ElectricSquare: The value e is declared but never used // catch (InvalidFormatException e) { } catch (InvalidFormatException) { } // ElectricSquare }
/** * Constructor. Opens a Zip based Open XML document. * * @param file * The file to open or create. * @param access * The package access mode. * @throws InvalidFormatException * If the content type part parsing encounters an error. */ public ZipPackage(FileInfo file, PackageAccess access) : base(access) { ZipFile zipFile = null; try { zipFile = ZipHelper.OpenZipFile(file); } catch (IOException e) { throw new InvalidOperationException( "Can't open the specified file: '" + file + "'", e); } this.zipArchive = new ZipFileZipEntrySource(zipFile); }
/** * Constructor. Opens a Zip based Open XML document. * * @param file * The file to open or create. * @param access * The package access mode. * @throws InvalidFormatException * If the content type part parsing encounters an error. */ public ZipPackage(FileInfo file, PackageAccess access) : base(access) { ZipFile zipFile = null; try { zipFile = ZipHelper.OpenZipFile(file); } catch (IOException e) { throw new InvalidOperationException( "Can't open the specified file: '" + file + "'", e); } this.zipArchive = new ZipFileZipEntrySource(zipFile); }
/** * Constructor. <b>Operation not supported.</b> * * @param in * Zip input stream to load. * @param access * @throws ArgumentException * If the specified input stream not an instance of * ZipInputStream. */ public ZipPackage(Stream in1, PackageAccess access) : base(access) { this.zipArchive = new ZipInputStreamZipEntrySource(new ZipInputStream(in1)); }
/** * Constructor. <b>Operation not supported.</b> * * @param in * Zip input stream to load. * @param access * @throws ArgumentException * If the specified input stream not an instance of * ZipInputStream. */ public ZipPackage(Stream in1, PackageAccess access) : base(access) { this.zipArchive = new ZipInputStreamZipEntrySource(new ZipInputStream(in1)); }
/** * Constructor. Creates a new ZipPackage. */ public ZipPackage() : base(defaultPackageAccess) { this.zipArchive = null; }
/** * Constructor. Creates a new ZipPackage. */ public ZipPackage() : base(defaultPackageAccess) { this.zipArchive = null; }
/** * Constructor. <b>Operation not supported.</b> * * @param in * Zip input stream to load. * @param access * @throws ArgumentException * If the specified input stream not an instance of * ZipInputStream. */ public ZipPackage(Stream filestream, PackageAccess access) : base(access) { isStream = true; this.zipArchive = new ZipInputStreamZipEntrySource(new ZipInputStream(filestream)); }
/** * Constructor. <b>Operation not supported.</b> * * @param in * Zip input stream to load. * @param access * @throws ArgumentException * If the specified input stream not an instance of * ZipInputStream. */ public ZipPackage(Stream filestream, PackageAccess access) : base(access) { isStream = true; this.zipArchive = new ZipInputStreamZipEntrySource(new ZipInputStream(filestream)); }