Class LargeFileSubstitutionHandler
java.lang.Object
com.sun.enterprise.admin.servermgmt.stringsubs.impl.FileSubstitutionHandler
com.sun.enterprise.admin.servermgmt.stringsubs.impl.LargeFileSubstitutionHandler
- All Implemented Interfaces:
Substitutable
Creates
Reader and Writer for the String substitution file. Implementation is useful for large files
which cann't be read entirely in a memory or need a substantial amount of memory.
To perform substitution it take helps of temporary file to write output, after substitution, temporary file renamed to input file.
-
Field Summary
Fields inherited from class com.sun.enterprise.admin.servermgmt.stringsubs.impl.FileSubstitutionHandler
_inputFile, _logger, _reader, _strings, _writer -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.sun.enterprise.admin.servermgmt.stringsubs.impl.FileSubstitutionHandler
getName
-
Constructor Details
-
LargeFileSubstitutionHandler
- Throws:
FileNotFoundException
-
-
Method Details
-
getReader
Description copied from interface:SubstitutableGets the character stream from the input.Implementation note: It is a good idea for the input stream to be buffered.
- Returns:
- A Reader.
-
getWriter
Description copied from interface:SubstitutableGets theWriterobject to write the character stream in to the output.Implementation note: It is a good idea for the output stream to be buffered.
- Returns:
- A Writer.
-
finish
public void finish()Description copied from interface:SubstitutableCalled at the completion of the substitution process to perform post operation. For e.g closing of reader/writer, cleaning of the temporary data... etc.- Specified by:
finishin interfaceSubstitutable- Overrides:
finishin classFileSubstitutionHandler
-