blob: dab621e3f8420c99b214ccd753f477ad81bba818 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2007 Instantiations, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Instantiations, Inc. - initial API and implementation
* xored software, Inc. - Eclipse way
*******************************************************************************/
package org.eclipse.epp.installer.internal.archive.zip;
import java.io.File;
import java.io.IOException;
import java.util.zip.ZipFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExecutableExtension;
import org.eclipse.epp.installer.archive.IArchive;
import org.eclipse.epp.installer.archive.IArchiveFactory;
public class ZipArchiveFactory implements IArchiveFactory, IExecutableExtension {
public IArchive createArchive(File file) throws IOException {
return new ZipArchive(new ZipFile(file));
}
public boolean isArchive(File file) {
return file.getName().endsWith(".zip");
}
public void setInitializationData(IConfigurationElement config,
String propertyName, Object data) throws CoreException {
}
}