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

public class LargeFileSubstitutionHandler extends FileSubstitutionHandler
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.

  • Constructor Details

  • Method Details

    • getReader

      public Reader getReader()
      Description copied from interface: Substitutable
      Gets the character stream from the input.

      Implementation note: It is a good idea for the input stream to be buffered.

      Returns:
      A Reader.
    • getWriter

      public Writer getWriter()
      Description copied from interface: Substitutable
      Gets the 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.

      Returns:
      A Writer.
    • finish

      public void finish()
      Description copied from interface: Substitutable
      Called 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:
      finish in interface Substitutable
      Overrides:
      finish in class FileSubstitutionHandler