Package com.sun.enterprise.admin.util
Class LineTokenReplacer
java.lang.Object
com.sun.enterprise.admin.util.LineTokenReplacer
-
Constructor Summary
ConstructorsConstructorDescriptionLineTokenReplacer(TokenValueSet tokens) Creates a new instance of TokenReplacer -
Method Summary
Modifier and TypeMethodDescriptionGet a Reader that substitutes the tokens in the content that it returns.voidConverts inputFile to outputFile with the following rules: Both files are encoded with UTF-8 Line endings are replaced bySystem.lineSeparator()Tokens from constructor are resolvedvoid
-
Constructor Details
-
LineTokenReplacer
Creates a new instance of TokenReplacer
-
-
Method Details
-
getReader
Get a Reader that substitutes the tokens in the content that it returns.- Parameters:
in- the content in which tokens are to be substituted- Returns:
- a Reader that returns the substituted content
-
replace
Converts inputFile to outputFile with the following rules:- Both files are encoded with UTF-8
- Line endings are replaced by
System.lineSeparator() - Tokens from constructor are resolved
- Parameters:
inputFile-outputFile-- Throws:
IllegalStateException- if conversion fails for any reason
-
replace
-