Class ChangeSetPerformer<I extends ArchiveInputStream<E>,O extends ArchiveOutputStream<E>,E extends ArchiveEntry>
java.lang.Object
org.apache.commons.compress.changes.ChangeSetPerformer<I,O,E>
- Type Parameters:
I
- TheArchiveInputStream
type.O
- TheArchiveOutputStream
type.E
- TheArchiveEntry
type, must be compatible between the inputI
and outputO
stream types.
public class ChangeSetPerformer<I extends ArchiveInputStream<E>,O extends ArchiveOutputStream<E>,E extends ArchiveEntry>
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.
- This class is immutable
- This class is thread-safe
-
Constructor Summary
ConstructorDescriptionChangeSetPerformer
(ChangeSet<E> changeSet) Constructs a ChangeSetPerformer with the changes from this ChangeSet -
Method Summary
Modifier and TypeMethodDescriptionPerforms all changes collected in this ChangeSet on the input stream and streams the result to the output stream.Performs all changes collected in this ChangeSet on the ZipFile and streams the result to the output stream.
-
Constructor Details
-
ChangeSetPerformer
Constructs a ChangeSetPerformer with the changes from this ChangeSet- Parameters:
changeSet
- the ChangeSet which operations are used for performing
-
-
Method Details
-
perform
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:
inputStream
- the InputStream to perform the changes onoutputStream
- the resulting OutputStream with all modifications- Returns:
- the results of this operation
- Throws:
IOException
- if a read/write error occurs
-
perform
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:
zipFile
- the ZipFile to perform the changes onoutputStream
- the resulting OutputStream with all modifications- Returns:
- the results of this operation
- Throws:
IOException
- if a read/write error occurs- Since:
- 1.5
-