public final class ResourceDefAdapter
extends java.lang.Object
ResourceDef
implementation, which is typically an Enum implementing the ResourceDef
interface.
The according Enum MUST be located in the same package like the resource-file.Modifier and Type | Field and Description |
---|---|
protected java.lang.Class |
definingClass |
Constructor and Description |
---|
ResourceDefAdapter(IconKey iconKey) |
ResourceDefAdapter(ResourceDef resourceDef,
FileDataType dataType,
java.lang.String resourceName) |
Modifier and Type | Method and Description |
---|---|
java.io.File |
copyToFile(java.io.File targetDir,
java.lang.String fileName)
Copies the ASCII resource to the given targetDirectory under the given name.
|
java.io.File |
copyToTargetDir(java.io.File targetDir) |
java.io.File |
copyToTargetDir(java.io.File targetDir,
ReplacementMap replacements)
Copies the ASCII resource to a file and performs the replacements defined in the given
ReplacementMap |
java.io.File |
copyToTargetDir(java.io.File targetDir,
java.lang.String fileName,
ReplacementMap replacements)
Copies the ASCII resource to a file and performs the replacements defined in the given
ReplacementMap |
ProgressReader |
createProgressReader()
Opens the resource for reading.
|
java.io.File |
extractToTargetDir(ApplicationContext ctx,
java.io.File targetDir)
Extracts the content of a zip-archive resource to the target directory.
|
ProgressInputStream |
getAsProgressInputStream() |
java.io.InputStream |
getAsStream() |
FileDataType |
getDataType() |
java.lang.String |
getResourceClassName()
Return the fully qualified class name of the resource
|
java.lang.String |
getResourceFilePath()
Return the relative file pathname of the the resource including the resourceName.
|
ResourceInfo |
getResourceInfo() |
java.lang.String |
getResourceName()
Returns the name of this resource
|
java.lang.String |
toString() |
public ResourceDefAdapter(IconKey iconKey)
public ResourceDefAdapter(ResourceDef resourceDef, FileDataType dataType, java.lang.String resourceName)
public FileDataType getDataType()
public java.lang.String getResourceName()
public java.lang.String getResourceClassName()
public java.io.InputStream getAsStream() throws java.io.IOException
java.io.IOException
public ProgressInputStream getAsProgressInputStream() throws java.io.IOException
java.io.IOException
public java.lang.String getResourceFilePath()
public ResourceInfo getResourceInfo()
public ProgressReader createProgressReader() throws java.io.IOException
java.io.IOException
public java.io.File copyToTargetDir(java.io.File targetDir) throws java.io.IOException
java.io.IOException
public java.io.File extractToTargetDir(ApplicationContext ctx, java.io.File targetDir) throws java.lang.Exception
java.lang.Exception
public java.io.File copyToTargetDir(java.io.File targetDir, ReplacementMap replacements) throws java.io.IOException
ReplacementMap
java.io.IOException
public java.io.File copyToTargetDir(java.io.File targetDir, java.lang.String fileName, ReplacementMap replacements) throws java.io.IOException
ReplacementMap
java.io.IOException
public java.io.File copyToFile(java.io.File targetDir, java.lang.String fileName) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2014 EsprIT-Systems. All Rights Reserved.