|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.izforge.izpack.PackFile
public class PackFile
Encloses information about a packed file. This class abstracts the way file data is stored to package.
Field Summary | |
---|---|
private java.util.Map |
additionals
Additional attributes or any else for customisation |
private java.lang.String |
condition
condition for this packfile |
private boolean |
isDirectory
True if file is a directory (length should be 0 or ignored) |
private long |
length
The length of the file in bytes |
private long |
mtime
The last-modification time of the file. |
long |
offsetInPreviousPack
|
private java.util.List<OsConstraint> |
osConstraints
The target operating system constraints of this file |
private int |
override
Whether or not this file is going to override any existing ones |
static int |
OVERRIDE_ASK_FALSE
|
static int |
OVERRIDE_ASK_TRUE
|
static int |
OVERRIDE_FALSE
|
static int |
OVERRIDE_TRUE
|
static int |
OVERRIDE_UPDATE
|
private boolean |
pack200Jar
True if the file is a Jar and pack200 compression us activated. |
java.lang.String |
previousPackId
|
protected java.lang.String |
relativePath
The Path of the file relative to the given (compiletime's) basedirectory. |
(package private) static long |
serialVersionUID
|
java.lang.String |
sourcePath
Only available when compiling. |
private java.lang.String |
targetPath
The full path name of the target file |
Constructor Summary | |
---|---|
PackFile(java.io.File baseDir,
java.io.File src,
java.lang.String target,
java.util.List<OsConstraint> osList,
int override)
Constructs and initializes from a source file. |
|
PackFile(java.io.File baseDir,
java.io.File src,
java.lang.String target,
java.util.List<OsConstraint> osList,
int override,
java.util.Map additionals)
Constructs and initializes from a source file. |
|
PackFile(java.io.File src,
java.lang.String relativeSourcePath,
java.lang.String target,
java.util.List<OsConstraint> osList,
int override,
java.util.Map additionals)
Constructs and initializes from a source file. |
Method Summary | |
---|---|
static java.lang.String |
computeRelativePathFrom(java.io.File baseDir,
java.io.File file)
Builds the relative path of file to the baseDir. |
java.util.Map |
getAdditionals()
Returns the additionals map. |
java.lang.String |
getCondition()
|
java.lang.String |
getRelativeSourcePath()
The Path of the file relative to the given (compiletime's) basedirectory. |
java.lang.String |
getTargetPath()
The full path name of the target file, using '/' as fileseparator. |
boolean |
hasCondition()
|
boolean |
isBackReference()
|
boolean |
isDirectory()
|
boolean |
isPack200Jar()
|
long |
lastModified()
The last-modification time of the file. |
long |
length()
The length of the file in bytes |
java.util.List<OsConstraint> |
osConstraints()
The target operating system constraints of this file |
int |
override()
Whether or not this file is going to override any existing ones |
void |
setCondition(java.lang.String condition)
|
void |
setPack200Jar(boolean pack200Jar)
|
void |
setPreviousPackFileRef(java.lang.String previousPackId,
java.lang.Long offsetInPreviousPack)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final long serialVersionUID
public static final int OVERRIDE_FALSE
public static final int OVERRIDE_TRUE
public static final int OVERRIDE_ASK_FALSE
public static final int OVERRIDE_ASK_TRUE
public static final int OVERRIDE_UPDATE
public transient java.lang.String sourcePath
protected java.lang.String relativePath
private java.lang.String targetPath
private java.util.List<OsConstraint> osConstraints
private long length
private long mtime
private boolean isDirectory
private int override
private java.util.Map additionals
public java.lang.String previousPackId
public long offsetInPreviousPack
private boolean pack200Jar
private java.lang.String condition
Constructor Detail |
---|
public PackFile(java.io.File baseDir, java.io.File src, java.lang.String target, java.util.List<OsConstraint> osList, int override) throws java.io.FileNotFoundException
baseDir
- the baseDirectory of the Fileselection/compilation or nullsrc
- file which this PackFile describestarget
- the path to install the file toosList
- OS constraintsoverride
- what to do when the file already exists
java.io.FileNotFoundException
- if the specified file does not exist.public PackFile(java.io.File src, java.lang.String relativeSourcePath, java.lang.String target, java.util.List<OsConstraint> osList, int override, java.util.Map additionals) throws java.io.FileNotFoundException
src
- file which this PackFile describesrelativeSourcePath
- the path relative to the compiletime's basedirectory, use computeRelativePathFrom(File, File) to compute this.target
- the path to install the file toosList
- OS constraintsoverride
- what to do when the file already existsadditionals
- additional attributes
java.io.FileNotFoundException
- if the specified file does not exist.public PackFile(java.io.File baseDir, java.io.File src, java.lang.String target, java.util.List<OsConstraint> osList, int override, java.util.Map additionals) throws java.io.FileNotFoundException
baseDir
- The Base directory that is used to search for the files. This is used to build the relative path'ssrc
- file which this PackFile describestarget
- the path to install the file toosList
- OS constraintsoverride
- what to do when the file already existsadditionals
- additional attributes
java.io.FileNotFoundException
- if the specified file does not exist.Method Detail |
---|
public static java.lang.String computeRelativePathFrom(java.io.File baseDir, java.io.File file)
baseDir
- The Base Directory to build the relative path fromfile
- the file inside basDir
public void setPreviousPackFileRef(java.lang.String previousPackId, java.lang.Long offsetInPreviousPack)
public final java.util.List<OsConstraint> osConstraints()
public final long length()
public final long lastModified()
public final int override()
public final boolean isDirectory()
public final boolean isBackReference()
public final java.lang.String getTargetPath()
public java.lang.String getRelativeSourcePath()
public java.util.Map getAdditionals()
public java.lang.String getCondition()
public void setCondition(java.lang.String condition)
condition
- the condition to setpublic boolean hasCondition()
public boolean isPack200Jar()
public void setPack200Jar(boolean pack200Jar)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |