public class LargeFileSubstitutionHandler extends FileSubstitutionHandler
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.
_inputFile, _logger, _reader, _strings, _writer
Constructor and Description |
---|
LargeFileSubstitutionHandler(File file) |
Modifier and Type | Method and Description |
---|---|
void |
finish()
Called at the completion of the substitution process to perform
post operation.
|
Reader |
getReader()
Gets the character stream from the input.
|
Writer |
getWriter()
Gets the
Writer object to write the character stream in to
the output. |
getName
public LargeFileSubstitutionHandler(File file) throws FileNotFoundException
FileNotFoundException
public Reader getReader()
Substitutable
Implementation note: It is a good idea for the input stream to be buffered.
public Writer getWriter()
Substitutable
Writer
object to write the character stream in to
the output.
Implementation note: It is a good idea for the output stream to be buffered.
public void finish()
Substitutable
finish
in interface Substitutable
finish
in class FileSubstitutionHandler
Copyright © 2018. All rights reserved.