public interface VariableSubstitutor extends Serializable
| Modifier and Type | Method and Description |
|---|---|
void |
setBracesRequired(boolean braces)
Specify whether this substitutor requires braces.
|
int |
substitute(InputStream in,
OutputStream out,
SubstitutionType type,
String encoding)
Substitutes the variables found in the specified input stream.
|
String |
substitute(InputStream in,
SubstitutionType type)
Substitute method Variant that gets An Input Stream and returns A String
|
int |
substitute(Reader reader,
Writer writer,
SubstitutionType type)
Substitutes the variables found in the data read from the specified reader.
|
String |
substitute(String str)
Substitutes the variables found in the specified string.
|
String |
substitute(String str,
SubstitutionType type)
Substitutes the variables found in the specified string.
|
void setBracesRequired(boolean braces)
String substitute(String str)
str - the string to check for variablesIllegalArgumentException - if unknown escaping type specifiedString substitute(String str, SubstitutionType type)
str - the string to check for variablestype - the escaping typeIllegalArgumentException - if unknown escaping type specifiedint substitute(InputStream in, OutputStream out, SubstitutionType type, String encoding) throws Exception
in - the input stream to readout - the output stream to writetype - the file type or null for plainencoding - the character encoding or null for defaultIllegalArgumentException - if unknown file type specifiedUnsupportedEncodingException - if encoding not supportedIOException - if an I/O error occursExceptionString substitute(InputStream in, SubstitutionType type) throws Exception
in - The Input Stream, with Placeholderstype - The used FormatTypeIllegalArgumentException - If a wrong input was given.UnsupportedEncodingException - If the file comes with a wrong EncodingIOException - If an I/O Error occurs.Exceptionint substitute(Reader reader, Writer writer, SubstitutionType type) throws Exception
reader - the reader to readwriter - the writer used to write data outtype - the file type or null for plainIllegalArgumentException - if unknown file type specifiedIOException - if an I/O error occursExceptionCopyright © 2001–2025. All rights reserved.