com.izforge.izpack.compressor.PackCompressorBase Maven / Gradle / Ivy
/*
* $Id: PackCompressorBase.java 2163 2008-05-18 13:48:36Z jponge $
* IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
*
* http://izpack.org/
* http://izpack.codehaus.org/
*
* Copyright 2005 Klaus Bartz
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.izforge.izpack.compressor;
import com.izforge.izpack.compiler.Compiler;
import java.io.*;
import java.lang.reflect.Constructor;
import java.net.URL;
import java.net.URLClassLoader;
/**
* IzPack will be able to support different compression methods for the
* packs included in the installation jar file.
* This abstract class implements the interface PackCompressor for
* the common needed methods.
*
* @author Klaus Bartz
*/
public abstract class PackCompressorBase implements PackCompressor
{
protected String[] formatNames = null;
protected String[] containerPaths = null;
protected String decoderMapper = null;
/**
* Should contain all full qualified (use dots, not slashes)
* names of the class files. Regex will be suported in the
* manner of String.match
.
* Example:
* "org.apache.tools.bzip2.CBZip2InputStream.*"
* Do not forget the dot before the asterix.
* For an other example see class BZip2PackCompressor.
*/
protected String[][] decoderClassNames = null;
protected String encoderClassName = null;
protected Class[] paramsClasses = null;
private Compiler compiler;
private Constructor