|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
S - type for all setter operationsR - type for all remove operationspublic interface FileModifier<S,R>
Interface which allows modifications on the underlying storage using a generic interface. You can manipulate storage contents using elements with the following mutable actions.
| Method Summary | |
|---|---|
void |
abortChanges()
Aborts any in-memory changes that currently exist. |
void |
add(S element)
Appends the content of the buffer to the end of the storage medium. |
void |
addAll(java.util.List<S> elements)
Add new content from supplied buffer at the current position. |
void |
addAll(S... elements)
Adds an array of list at the current location in the order they appear in the array. |
void |
remove()
Removes an element at the current location. |
void |
removeAll()
All elements are removed. |
void |
removeAll(java.util.Collection<R> elements)
Bulk remove, that removes several elements from the collection. |
void |
removeAll(long count)
Removes a consecutive sequence of elements starting with the element at the current position. |
void |
removeAll(R... elements)
Bulk remove of all the elements found in the array. |
void |
replace(S element)
Replaces the current element with the new element specified. |
void |
retainAll(java.util.List<R> elements)
Bulk remove, that removes all records other then the ones found in the list. |
void |
retainAll(R... elements)
Bulk remove, that removes all records other then the ones found in the array. |
void |
swap(R dst,
R src)
Swaps the two elements around, physically, within the storage. |
| Method Detail |
|---|
void abortChanges()
throws java.io.IOException
java.io.IOException
void add(S element)
throws java.io.IOException
add in interface com.slytechs.utils.collection.IOAddable<S>element - add new element at current position
java.io.IOException - any IO errors
void addAll(java.util.List<S> elements)
throws java.io.IOException
elements - adds a list of elements at the current location in order they
appear in the list
java.io.IOException - any IO errors
void addAll(S... elements)
throws java.io.IOException
elements - array of elements to add
java.io.IOException - any IO errors
void remove()
throws java.io.IOException
remove in interface com.slytechs.utils.collection.IORemovablejava.io.IOException - any IO errors
void removeAll()
throws java.io.IOException
java.io.IOException
void removeAll(java.util.Collection<R> elements)
throws java.io.IOException
Bulk remove, that removes several elements from the collection. The elements that are part of the collection, must have been created by the underlying capture session associated with this interface. For example FilePackets retain certain information about the position within the file, the packet came from and this information is needed to efficiently perform the operation.
Note that it is typically a lot more efficient to use bulk methods instead of doing the same work one iteration at a time. The implementation can use certain optimazations to perform the task at hand as efficiently as possible.
elements - collection of segments to be removed from the underlying storage
java.io.IOException - any IO errors
void removeAll(long count)
throws java.io.IOException
count - number of elements to remove from the current position on
java.io.IOException - any IO errors
void removeAll(R... elements)
throws java.io.IOException
elements - offset of the region to be removed
java.io.IOException - any IO errors
void replace(S element)
throws java.io.IOException
element - element containing new data
java.io.IOException - any IO errors
void retainAll(java.util.List<R> elements)
throws java.io.IOException
Bulk remove, that removes all records other then the ones found in the list. The records that are part of the list, must have been created by the underlying capture session associated with this interface. For example FilePackets retain certain information about the position within the file, the packet came from and this information is needed to efficiently perform the operation.
The retained elements are reorder to match the order of as specified by the list's order. Therefore it is important order the records to be retained in a specificaly user defined order. Note you can always use Collections.sort method to sort the list easily if needed.
elements - collection of elements to be retained in the underlying storage
java.io.IOException - any IO errors
void retainAll(R... elements)
throws java.io.IOException
Bulk remove, that removes all records other then the ones found in the array. The records that are part of the collection, must have been created by the underlying capture session associated with this interface. For example FilePackets retain certain information about the position within the file, the packet came from and this information is needed to efficiently perform the operation.
The retained elements are reorder to match the order of as specified in the array.
elements - array of elements to be retained in the underlying storage
java.io.IOException - any IO errors
void swap(R dst,
R src)
throws java.io.IOException
dst - source record will be copied into this destination record's spacesrc - destination record will be copied into this source record's space
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||