public class PackFile extends Object implements Serializable
| Constructor and Description |
|---|
PackFile(File baseDir,
File src,
String target,
List<OsModel> osList,
OverrideType override,
String overrideRenameTo,
Blockable blockable,
Map<String,String> pack200Properties)
Constructs and initializes from a source file.
|
PackFile(File baseDir,
File src,
String target,
List<OsModel> osList,
OverrideType override,
String overrideRenameTo,
Blockable blockable,
Map additionals,
Map<String,String> pack200Properties)
Constructs and initializes from a source file.
|
PackFile(File src,
String relativeSourcePath,
String target,
List<OsModel> osList,
OverrideType override,
String overrideRenameTo,
Blockable blockable,
Map additionals,
Map<String,String> pack200Properties)
Constructs and initializes from a source file.
|
| Modifier and Type | Method and Description |
|---|---|
Blockable |
blockable()
Whether or not this file might be blocked during installation/uninstallation
|
Map |
getAdditionals()
Returns the additionals map.
|
String |
getCondition() |
File |
getFile()
The packed file object
|
int |
getId()
Get the unique ID compiled into this object
|
PackFile |
getLinkedPackFile() |
Map<String,String> |
getPack200Properties() |
String |
getRelativeSourcePath()
The Path of the file relative to the given (compiletime's) basedirectory.
|
long |
getStreamOffset() |
String |
getStreamResourceName() |
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
|
List<OsModel> |
osConstraints()
The target operating system constraints of this file
|
OverrideType |
override()
Whether or not this file is going to override any existing ones
|
String |
overrideRenameTo()
Returns globmapper expression for mapping the resulting file name if overriding is allowed
and the file does already exist.
|
void |
setCondition(String condition) |
void |
setLinkedPackFile(PackFile linkedPackFile) |
void |
setLoosePackInfo(boolean loose) |
void |
setSize(long size)
Override the acutal packed file size (after compressing)
|
void |
setStreamOffset(long offset) |
void |
setStreamResourceName(String streamResourceName) |
long |
size()
The size of the file in bytes (is the same as the length if it is not a loose pack)
|
String |
toString() |
public PackFile(File baseDir, File src, String target, List<OsModel> osList, OverrideType override, String overrideRenameTo, Blockable blockable, Map<String,String> pack200Properties) throws IOException
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 existsFileNotFoundException - if the specified file does not exist.IOExceptionpublic PackFile(File src, String relativeSourcePath, String target, List<OsModel> osList, OverrideType override, String overrideRenameTo, Blockable blockable, Map additionals, Map<String,String> pack200Properties) throws 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 attributesFileNotFoundException - if the specified file does not exist.public PackFile(File baseDir, File src, String target, List<OsModel> osList, OverrideType override, String overrideRenameTo, Blockable blockable, Map additionals, Map<String,String> pack200Properties) throws IOException
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 attributesFileNotFoundException - if the specified file does not exist.IOExceptionpublic int getId()
public PackFile getLinkedPackFile()
public void setLinkedPackFile(PackFile linkedPackFile)
public String getStreamResourceName()
public void setStreamResourceName(String streamResourceName)
public long getStreamOffset()
public void setStreamOffset(long offset)
public final List<OsModel> osConstraints()
public final File getFile()
public final long length()
public final long size()
public void setSize(long size)
size - the size in bytespublic final long lastModified()
public final OverrideType override()
public final String overrideRenameTo()
public final Blockable blockable()
public final boolean isDirectory()
public final boolean isBackReference()
public final String getTargetPath()
public String getRelativeSourcePath()
public Map getAdditionals()
public String getCondition()
public void setCondition(String condition)
condition - the condition to setpublic boolean hasCondition()
public boolean isPack200Jar()
public void setLoosePackInfo(boolean loose)
Copyright © 2001–2025. All rights reserved.