|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.compress.changes.ChangeSetPerformer
public class ChangeSetPerformer
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.
Field Summary | |
---|---|
private java.util.Set |
changes
|
Constructor Summary | |
---|---|
ChangeSetPerformer(ChangeSet changeSet)
Constructs a ChangeSetPerformer with the changes from this ChangeSet |
Method Summary | |
---|---|
private void |
copyStream(java.io.InputStream in,
ArchiveOutputStream out,
ArchiveEntry entry)
Copies the ArchiveEntry to the Output stream |
private boolean |
isDeletedLater(java.util.Set workingSet,
ArchiveEntry entry)
Checks if an ArchiveEntry is deleted later in the ChangeSet. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.util.Set changes
Constructor Detail |
---|
public ChangeSetPerformer(ChangeSet changeSet)
changeSet
- the ChangeSet which operations are used for performingMethod Detail |
---|
public ChangeSetResults perform(ArchiveInputStream in, ArchiveOutputStream out) throws java.io.IOException
in
- the InputStream to perform the changes onout
- the resulting OutputStream with all modifications
java.io.IOException
- if an read/write error occursprivate boolean isDeletedLater(java.util.Set workingSet, ArchiveEntry entry)
entry
- the entry to check
private void copyStream(java.io.InputStream in, ArchiveOutputStream out, ArchiveEntry entry) throws java.io.IOException
in
- the stream to read the data fromout
- the stream to write the data toentry
- the entry to write
java.io.IOException
- if data cannot be read or written
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |