Class AbstractIvmlModifier.CopiedFile

  • Enclosing class:
    AbstractIvmlModifier

    protected static class AbstractIvmlModifier.CopiedFile
    extends java.lang.Object
    Stores original and copied file.
    Author:
    Holger Eichelberger, SSE
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.File copy  
      private java.io.File original  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private CopiedFile​(java.io.File original, java.io.File copy)
      Creates an instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void clean()
      Cleans up unneeded copies.
      private void restore()
      Restores the original file or, if no copy exists/original was yet created, deletes original.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • original

        private java.io.File original
      • copy

        private java.io.File copy
    • Constructor Detail

      • CopiedFile

        private CopiedFile​(java.io.File original,
                           java.io.File copy)
        Creates an instance.
        Parameters:
        original - the original
        copy - the copy, may be null if original was yet created
    • Method Detail

      • restore

        private void restore()
                      throws java.io.IOException
        Restores the original file or, if no copy exists/original was yet created, deletes original.
        Throws:
        java.io.IOException - if copying/overwriting fails
      • clean

        private void clean()
        Cleans up unneeded copies.