org.apache.commons.compress.changes

## Class ChangeSetPerformer

- java.lang.Object
- - org.apache.commons.compress.changes.ChangeSetPerformer

-     public class ChangeSetPerformer
      extends Object

  Performs ChangeSet operations on a stream. This class is thread safe and can be used multiple times. It operates on a copy of the ChangeSet. If the ChangeSet changes, a new Performer must be created.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ChangeSetPerformer(ChangeSet changeSet)` Constructs a ChangeSetPerformer with the changes from this ChangeSet

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ChangeSetResults` | `perform(ArchiveInputStream in, ArchiveOutputStream out)` Performs all changes collected in this ChangeSet on the input stream and streams the result to the output stream.
    `ChangeSetResults` | `perform(ZipFile in, ArchiveOutputStream out)` Performs all changes collected in this ChangeSet on the ZipFile and streams the result to the output stream.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ChangeSetPerformer

          public ChangeSetPerformer(ChangeSet changeSet)

      Constructs a ChangeSetPerformer with the changes from this ChangeSet
      Parameters:
        `changeSet` - the ChangeSet which operations are used for performing

  - ### Method Detail

    - #### perform

          public ChangeSetResults perform(ArchiveInputStream in,
                                 ArchiveOutputStream out)
                                   throws IOException

      Performs all changes collected in this ChangeSet on the input stream and streams the result to the output stream. Perform may be called more than once. This method finishes the stream, no other entries should be added after that.
      Parameters:
        `in` - the InputStream to perform the changes on
        `out` - the resulting OutputStream with all modifications
      Returns:
        the results of this operation
      Throws:
        `IOException` - if an read/write error occurs

    - #### perform

          public ChangeSetResults perform(ZipFile in,
                                 ArchiveOutputStream out)
                                   throws IOException

      Performs all changes collected in this ChangeSet on the ZipFile and streams the result to the output stream. Perform may be called more than once. This method finishes the stream, no other entries should be added after that.
      Parameters:
        `in` - the ZipFile to perform the changes on
        `out` - the resulting OutputStream with all modifications
      Returns:
        the results of this operation
      Throws:
        `IOException` - if an read/write error occurs
      Since:
        1.5

Copyright © 2014 The Apache Software Foundation. All rights reserved.