KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > izforge > izpack > XPackFile


1 /*
2  * IzPack - Copyright 2001-2007 Julien Ponge, All Rights Reserved.
3  *
4  * http://www.izforge.com/izpack/ http://developer.berlios.de/projects/izpack/
5  *
6  * Copyright 2007 Dennis Reil
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
9  * in compliance with the License. You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software distributed under the License
14  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
15  * or implied. See the License for the specific language governing permissions and limitations under
16  * the License.
17  */

18 package com.izforge.izpack;
19
20 import java.io.File JavaDoc;
21 import java.io.FileNotFoundException JavaDoc;
22 import java.util.List JavaDoc;
23 import java.util.Map JavaDoc;
24
25 import com.izforge.izpack.PackFile;
26
27 /**
28  * Extends the packfile by the information at which file position an entry is stored
29  *
30  * @author Dennis Reil, <Dennis.Reil@reddot.de>
31  *
32  */

33 public class XPackFile extends PackFile
34 {
35
36     private static final long serialVersionUID = 5875050264763504283L;
37
38     protected long archivefileposition;
39
40     protected PackFile packfile;
41
42     /**
43      * @param src
44      * @param target
45      * @param osList
46      * @param override
47      * @throws FileNotFoundException
48      */

49     public XPackFile(File JavaDoc baseDir, File JavaDoc src, String JavaDoc target, List JavaDoc osList, int override)
50             throws FileNotFoundException JavaDoc
51     {
52         super(baseDir, src, target, osList, override);
53         this.archivefileposition = 0;
54     }
55
56     /**
57      * @param src
58      * @param target
59      * @param osList
60      * @param override
61      * @param additionals
62      * @throws FileNotFoundException
63      */

64     public XPackFile(File JavaDoc baseDir, File JavaDoc src, String JavaDoc target, List JavaDoc osList, int override, Map JavaDoc additionals)
65             throws FileNotFoundException JavaDoc
66     {
67         super(baseDir, src, target, osList, override, additionals);
68         this.archivefileposition = 0;
69     }
70
71     public XPackFile(PackFile packf) throws FileNotFoundException JavaDoc
72     {
73         super(new File JavaDoc(packf.sourcePath), packf.relativePath, packf.getTargetPath(), packf.osConstraints(), packf
74                 .override(), packf.getAdditionals());
75         this.archivefileposition = 0;
76         this.packfile = packf;
77     }
78
79     public long getArchivefileposition()
80     {
81         return archivefileposition;
82     }
83
84     public void setArchivefileposition(long archivefileposition)
85     {
86         this.archivefileposition = archivefileposition;
87     }
88
89     public PackFile getPackfile()
90     {
91         return packfile;
92     }
93
94     public void setPackfile(PackFile packfile)
95     {
96         this.packfile = packfile;
97     }
98
99 }
Popular Tags