/*
 * IzPack - Copyright 2001-2007 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/ http://developer.berlios.de/projects/izpack/
 * 
 * Copyright 2007 Dennis Reil
 * 
 * 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;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.List;
import java.util.Map;

import com.izforge.izpack.PackFile;

/**
 * Extends the packfile by the information at which file position an entry is stored
 * 
 * @author Dennis Reil, <Dennis.Reil@reddot.de>
 * 
 */
public class XPackFile extends PackFile
{

    private static final long serialVersionUID = 5875050264763504283L;

    protected long archivefileposition;

    protected PackFile packfile;

    /**
     * @param src
     * @param target
     * @param osList
     * @param override
     * @throws FileNotFoundException
     */
    public XPackFile(File baseDir, File src, String target, List osList, int override)
            throws FileNotFoundException
    {
        super(baseDir, src, target, osList, override);
        this.archivefileposition = 0;
    }

    /**
     * @param src
     * @param target
     * @param osList
     * @param override
     * @param additionals
     * @throws FileNotFoundException
     */
    public XPackFile(File baseDir, File src, String target, List osList, int override, Map additionals)
            throws FileNotFoundException
    {
        super(baseDir, src, target, osList, override, additionals);
        this.archivefileposition = 0;
    }

    public XPackFile(PackFile packf) throws FileNotFoundException
    {
        super(new File(packf.sourcePath), packf.relativePath, packf.getTargetPath(), packf.osConstraints(), packf
                .override(), packf.getAdditionals());
        this.archivefileposition = 0;
        this.packfile = packf;
    }

    public long getArchivefileposition()
    {
        return archivefileposition;
    }

    public void setArchivefileposition(long archivefileposition)
    {
        this.archivefileposition = archivefileposition;
    }

    public PackFile getPackfile()
    {
        return packfile;
    }

    public void setPackfile(PackFile packfile)
    {
        this.packfile = packfile;
    }

}
@@ -1085,17 +1085,16 @@
 kFile%0A%7B%0A
-%0A
     priv
@@ -1156,17 +1156,16 @@
 04283L;%0A
-%0A
     prot
@@ -1199,42 +1199,12 @@
 ion;
-%0A%0A
     
-protected PackFile packfile;
 %0A%0A  
@@ -2274,25 +2274,24 @@
 ion = 0;
-%0A
         
 this.pac
@@ -2286,30 +2286,8 @@
     
-this.packfile = packf;
 %0A   
@@ -2573,116 +2573,18 @@
 urn 
-packfile;%0A    %7D%0A%0A    public void setPackfile(PackFile packfile)%0A    %7B%0A        this.packfile = packfile
+this
 ;%0A    %7D%0A
 %0A%7D
@@ -2581,10 +2581,9 @@
 ;%0A    %7D%0A
-%0A
 %7D

clean up