zinger.util
Class Util
java.lang.Object
|
+--zinger.util.Util
- public final class Util
- extends java.lang.Object
A general utility class.
Method Summary |
static void |
evalAllProperties(java.util.Properties in,
java.util.Properties out)
Evaluates all properties in a Properties object. |
static java.lang.String |
evalProperty(java.lang.String propertyName,
java.util.Properties in,
java.util.Properties out)
Evaluates a property in a Properties object. |
static void |
loadImports(java.util.Properties p)
|
static void |
loadImports(java.util.Properties p,
java.util.Locale locale,
java.lang.ClassLoader loader)
|
static void |
pipeStream(java.io.InputStream in,
java.io.OutputStream out)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTY_REFERENCE_PREFIX
public static final java.lang.String PROPERTY_REFERENCE_PREFIX
- Used for property reference evaluation.
Set to "${".
- See Also:
PROPERTY_REFERENCE_POSTFIX
PROPERTY_REFERENCE_PREFIX_LENGTH
protected static final int PROPERTY_REFERENCE_PREFIX_LENGTH
- A constant that enables code dealing with parsing property references
not to compute the length of the reference prefix every time.
- See Also:
PROPERTY_REFERENCE_PREFIX
PROPERTY_REFERENCE_POSTFIX
public static final java.lang.String PROPERTY_REFERENCE_POSTFIX
- Used for property reference evaluation.
Set to "}".
- See Also:
PROPERTY_REFERENCE_PREFIX
PROPERTY_REFERENCE_POSTFIX_LENGTH
protected static final int PROPERTY_REFERENCE_POSTFIX_LENGTH
- A constant that enables code dealing with parsing property references
not to compute the length of the reference postfix every time.
- See Also:
PROPERTY_REFERENCE_POSTFIX
IMPORT_PROPERTY
public static final java.lang.String IMPORT_PROPERTY
IMPORT_DELIMITER
public static final java.lang.String IMPORT_DELIMITER
evalProperty
public static java.lang.String evalProperty(java.lang.String propertyName,
java.util.Properties in,
java.util.Properties out)
- Evaluates a property in a
Properties
object.
Property values can include references to other properties. In such cases, those references
are evaluated. References are indicated by enclosing the name of the referred-to property
in "${" and "}".
- Parameters:
propertyName
- the name of the property to be evaluatedin
- the Properties
object to evaluate the property in question and all its referencesout
- if not null
, the result of the evaluation is written into this Properties
object. It is okay to pass the same Properties
object as in
and
out
. In that case, the property will be written over with the resulting value.- See Also:
PROPERTY_REFERENCE_PREFIX
,
PROPERTY_REFERENCE_POSTFIX
,
Properties
evalAllProperties
public static void evalAllProperties(java.util.Properties in,
java.util.Properties out)
- Evaluates all properties in a
Properties
object.
- See Also:
evalProperty(java.lang.String, java.util.Properties, java.util.Properties)
loadImports
public static void loadImports(java.util.Properties p,
java.util.Locale locale,
java.lang.ClassLoader loader)
loadImports
public static void loadImports(java.util.Properties p)
pipeStream
public static void pipeStream(java.io.InputStream in,
java.io.OutputStream out)
throws java.io.IOException