01: /*
02: * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
03: *
04: * http://izpack.org/ http://izpack.codehaus.org/
05: *
06: * Copyright 2007 Dennis Reil
07: *
08: * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
09: * 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;
21: import java.io.FileNotFoundException;
22: import java.util.List;
23: import java.util.Map;
24:
25: import com.izforge.izpack.PackFile;
26: import com.izforge.izpack.util.OsConstraint;
27:
28: /**
29: * Extends the packfile by the information at which file position an entry is stored
30: *
31: * @author Dennis Reil, <Dennis.Reil@reddot.de>
32: *
33: */
34: public class XPackFile extends PackFile {
35: private static final long serialVersionUID = 5875050264763504283L;
36: protected long archivefileposition;
37:
38: /**
39: * @param src
40: * @param target
41: * @param osList
42: * @param override
43: * @throws FileNotFoundException
44: */
45: public XPackFile(File baseDir, File src, String target,
46: List<OsConstraint> osList, int override)
47: throws FileNotFoundException {
48: super (baseDir, src, target, osList, override);
49: this .archivefileposition = 0;
50: }
51:
52: /**
53: * @param src
54: * @param target
55: * @param osList
56: * @param override
57: * @param additionals
58: * @throws FileNotFoundException
59: */
60: public XPackFile(File baseDir, File src, String target,
61: List<OsConstraint> osList, int override, Map additionals)
62: throws FileNotFoundException {
63: super (baseDir, src, target, osList, override, additionals);
64: this .archivefileposition = 0;
65: }
66:
67: public XPackFile(PackFile packf) throws FileNotFoundException {
68: super (new File(packf.sourcePath), packf.relativePath, packf
69: .getTargetPath(), packf.osConstraints(), packf
70: .override(), packf.getAdditionals());
71: this .archivefileposition = 0;
72: }
73:
74: public long getArchivefileposition() {
75: return archivefileposition;
76: }
77:
78: public void setArchivefileposition(long archivefileposition) {
79: this .archivefileposition = archivefileposition;
80: }
81:
82: public PackFile getPackfile() {
83: return this;
84: }
85: }
|