|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.fuin.kickstart4j.AbstractFile
org.fuin.kickstart4j.SrcFile
public final class SrcFile
A file at the source directory. This class is immutable.
| Field Summary | |
|---|---|
static java.lang.String |
UNZIP_TOKEN
Token used to mark archives to be unzipped at the target location. |
| Constructor Summary | |
|---|---|
SrcFile(java.io.File baseDir,
java.io.File file,
boolean unzip,
boolean loadAlways,
boolean addToClasspath,
java.lang.String srcFileUrl)
Constructor with base directory and file. |
|
SrcFile(SrcFile srcFile,
java.io.File file)
Copy-Constructor with source file and local file. |
|
SrcFile(java.lang.String path,
java.lang.String filename,
java.lang.String md5Hash,
long size,
boolean unzip,
boolean loadAlways,
boolean addToClasspath,
java.lang.String srcFileUrl)
Constructor with all arguments. |
|
| Method Summary | |
|---|---|
long |
getSize()
Returns the size of the file. |
int |
getSizeAsInt()
Returns the size as integer value. |
java.lang.String |
getSrcFileUrl()
Returns the URL where the source file is located. |
java.net.URL |
getSrcFileURL()
Returns the URL where the source file is located. |
boolean |
isAddToClasspath()
Returns if this is a JAR file to be added to the classpath. |
boolean |
isLoadAlways()
Returns if this file sould be loaded always (no matter if lazy loading is enabled or not). |
boolean |
isUnzip()
Returns if the file is an atchive and should be decompressed at the target location. |
java.lang.String |
toString()
|
java.lang.String |
toXML()
|
| Methods inherited from class org.fuin.kickstart4j.AbstractFile |
|---|
getCanonicalPathAndFilename, getDestFile, getFilename, getMd5Hash, getPath, getRelativeSlashPathAndFilename, getSlashPath |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String UNZIP_TOKEN
| Constructor Detail |
|---|
public SrcFile(java.io.File baseDir,
java.io.File file,
boolean unzip,
boolean loadAlways,
boolean addToClasspath,
java.lang.String srcFileUrl)
baseDir - Base directory for calculating the relative path.file - File inside the base directory.unzip - If the file is an archive and should be decompressed at the
target location true else false.loadAlways - Load file always (no matter if lazy loading is enabled or
not).addToClasspath - JAR file to be added to the classpath.srcFileUrl - URL where the source file is located.
public SrcFile(java.lang.String path,
java.lang.String filename,
java.lang.String md5Hash,
long size,
boolean unzip,
boolean loadAlways,
boolean addToClasspath,
java.lang.String srcFileUrl)
path - Path relative to the base directory.filename - Filename without path.md5Hash - MD5 hash code of the file.size - Size of the file.unzip - If the file is an archive and should be decompressed at the
target location true else false.loadAlways - Load file always (no matter if lazy loading is enabled or
not).addToClasspath - JAR file to be added to the classpath.srcFileUrl - URL where the source file is located.
public SrcFile(SrcFile srcFile,
java.io.File file)
srcFile - Source file to copy values from (except hash and file size).file - File to create hash for and get file size from.| Method Detail |
|---|
public final long getSize()
public final int getSizeAsInt()
Integer.MAX_VALUE is returned.
public final boolean isUnzip()
true
else falsepublic final boolean isAddToClasspath()
true else
false.public final boolean isLoadAlways()
true else false.public final java.lang.String getSrcFileUrl()
public final java.net.URL getSrcFileURL()
MalformedURLException is wrapped into a
RuntimeException.
public final java.lang.String toXML()
public final java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||