org.rhq.core.util.updater
Class InMemoryZipEntryRealizer
java.lang.Object
org.rhq.core.util.updater.InMemoryZipEntryRealizer
public class InMemoryZipEntryRealizer
- extends Object
This class will realize a zip file entry in memory. Note that this object is
intended to be used for small zip file entries (like configuration files).
Do not attempt to use this on large entries, as out-of-memory errors will
be sure to follow. Note that this doesn't limit the size of the zip file itself,
the only size restriction is on the size of the zip entry inside the zip file.
- Author:
- John Mazzitelli
|
Constructor Summary |
InMemoryZipEntryRealizer(File zipFile,
TemplateEngine templateEngine)
This object will realize entries found in the given zip file using
replacement values provided by the given template engine. |
|
Method Summary |
String |
realize(String zipEntryName)
Returns a string containing the content of the zip entry with its content realized; meaning
all replacement variables have been replaced with values provided by the template engine. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InMemoryZipEntryRealizer
public InMemoryZipEntryRealizer(File zipFile,
TemplateEngine templateEngine)
- This object will realize entries found in the given zip file using
replacement values provided by the given template engine.
- Parameters:
zipFile - the zip file where the entries are to be foundtemplateEngine - the engine used to replace the replacement variables in the zip entry.
if this is null, this realizer object will only extract
the zip file content but will not actually realize any replacement variables within
that zip file content
realize
public String realize(String zipEntryName)
throws Exception
- Returns a string containing the content of the zip entry with its content realized; meaning
all replacement variables have been replaced with values provided by the template engine.
- Parameters:
zipEntryName - the zip entry that is to be extracted in memory and realized
- Returns:
- the realized content of the zip entry
- Throws:
Exception
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.