org.simantics.databoard.file
Interface IFileList<T>

All Superinterfaces:
java.util.Collection<T>, java.lang.Iterable<T>, java.util.List<T>
All Known Implementing Classes:
FileList, RandomAccessBinaryList

public interface IFileList<T>
extends java.util.List<T>

ListFile a List view to a random access file.

Note! - IOExceptions are wrapped around RuntimeIOException. - The use of this class is not multi-thread safe.

Author:
Toni Kalajainen

Method Summary
 void close()
          Close the file
 Binding getBinding()
          Get class-data type binding
 java.io.File getFile()
          Get the mapped file
 void removeRange(int fromIndex, int toIndex)
          Removes from this list all of the elements whose index is between fromIndex, inclusive, and toIndex, exclusive.
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Method Detail

getFile

java.io.File getFile()
Get the mapped file

Returns:
file

getBinding

Binding getBinding()
Get class-data type binding

Returns:
the binding

removeRange

void removeRange(int fromIndex,
                 int toIndex)
Removes from this list all of the elements whose index is between fromIndex, inclusive, and toIndex, exclusive. Shifts any succeeding elements to the left (reduces their index). This call shortens the List by (toIndex - fromIndex) elements. (If toIndex==fromIndex, this operation has no effect.)

Parameters:
fromIndex - the index of the first element to removed.
toIndex - index after last element to be removed (exculsive).
Throws:
java.lang.UnsupportedOperationException - if the remove method is not supported by this list.
java.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index + count >= size()).

close

void close()
           throws java.io.IOException
Close the file

Throws:
java.io.IOException