|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.compress.changes.ChangeSet
public final class ChangeSet
ChangeSet collects and performs changes to an archive. Putting delete changes in this ChangeSet from multiple threads can cause conflicts.
Field Summary | |
---|---|
private java.util.Set |
changes
|
Constructor Summary | |
---|---|
ChangeSet()
|
Method Summary | |
---|---|
void |
add(ArchiveEntry pEntry,
java.io.InputStream pInput)
Adds a new archive entry to the archive. |
void |
add(ArchiveEntry pEntry,
java.io.InputStream pInput,
boolean replace)
Adds a new archive entry to the archive. |
private void |
addAddition(Change pChange)
Adds an addition change. |
private void |
addDeletion(Change pChange)
Adds an delete change. |
void |
delete(java.lang.String filename)
Deletes the file with the filename from the archive. |
void |
deleteDir(java.lang.String dirName)
Deletes the directory tree from the archive. |
(package private) java.util.Set |
getChanges()
Returns the list of changes as a copy. |
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 ChangeSet()
Method Detail |
---|
public void delete(java.lang.String filename)
filename
- the filename of the file to deletepublic void deleteDir(java.lang.String dirName)
dirName
- the name of the directory tree to deletepublic void add(ArchiveEntry pEntry, java.io.InputStream pInput)
pEntry
- the entry to addpInput
- the datastream to addpublic void add(ArchiveEntry pEntry, java.io.InputStream pInput, boolean replace)
pEntry
- the entry to addpInput
- the datastream to addreplace
- indicates the this change should replace existing entriesprivate void addAddition(Change pChange)
pChange
- the change which should result in an additionprivate void addDeletion(Change pChange)
pChange
- the change which should result in a deletionjava.util.Set getChanges()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |