|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<T>
org.simantics.databoard.file.RandomAccessBinaryList<T>
org.simantics.databoard.file.FileList<T>
public class FileList<T>
FileList is a file based implementation of a List collection. add() serializes the object to a file and get() deserializes.
Set, remove, insert and add operations flushes modifications to disk before returning.
Each operation may throw RuntimeIOException
Entry position index is on open if the file has variable width data type (eg. String). The entire file is scanned through.
Constructor Summary | |
---|---|
FileList(java.io.File file)
Create new random access list of Variants (Object) backed by a file |
|
FileList(java.io.File file,
Binding binding)
Create new random access list backed by a file |
|
FileList(java.io.File file,
Binding binding,
long startPos)
Create new random access list backed by a file using the default binary serialization. |
|
FileList(java.io.File file,
Binding binding,
long startPos,
SerializationFormat format)
Create new random access list backed by a file |
|
FileList(java.io.File file,
java.lang.Class<T> clazz)
Create new random access list backed by a file |
|
FileList(java.io.File file,
java.lang.Class<T> clazz,
long startPos)
Create new random access list backed by a file |
|
FileList(java.lang.String file,
Binding binding)
Create new random access list backed by a file |
|
FileList(java.lang.String file,
java.lang.Class<T> clazz)
Create new random access list backed by a file |
Method Summary | |
---|---|
void |
close()
Flushes the caches and closes the file handle. |
java.io.File |
getFile()
Get the mapped file |
Methods inherited from class org.simantics.databoard.file.RandomAccessBinaryList |
---|
add, addAll, addAll, get, getBinding, isOpen, remove, removeRange, set, setAll, size |
Methods inherited from class java.util.AbstractList |
---|
add, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
---|
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.simantics.databoard.file.IFileList |
---|
getBinding, removeRange |
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 |
Constructor Detail |
---|
public FileList(java.io.File file) throws java.io.IOException, BindingConstructionException, SerializerConstructionException, SerializationException
file
-
java.io.IOException
BindingConstructionException
SerializationException
SerializerConstructionException
public FileList(java.io.File file, java.lang.Class<T> clazz) throws java.io.IOException, BindingConstructionException, SerializerConstructionException, SerializationException
file
- clazz
-
java.io.IOException
BindingConstructionException
SerializationException
SerializerConstructionException
public FileList(java.lang.String file, java.lang.Class<T> clazz) throws java.io.IOException, BindingConstructionException, SerializerConstructionException, SerializationException
file
- clazz
-
java.io.IOException
BindingConstructionException
SerializationException
SerializerConstructionException
public FileList(java.lang.String file, Binding binding) throws java.io.IOException, SerializerConstructionException, SerializationException
file
- binding
-
java.io.IOException
SerializationException
SerializerConstructionException
public FileList(java.io.File file, Binding binding) throws java.io.IOException, SerializerConstructionException, SerializationException
file
- binding
-
java.io.IOException
SerializationException
SerializerConstructionException
public FileList(java.io.File file, java.lang.Class<T> clazz, long startPos) throws java.io.IOException, BindingConstructionException, SerializerConstructionException, SerializationException
file
- clazz
- startPos
-
java.io.IOException
BindingConstructionException
SerializationException
SerializerConstructionException
public FileList(java.io.File file, Binding binding, long startPos) throws java.io.IOException, SerializationException, SerializerConstructionException
file
- filebinding
- startPos
- The position of the first sample in file
java.io.IOException
SerializationException
- Error with the file, could not build entry index table
SerializerConstructionException
public FileList(java.io.File file, Binding binding, long startPos, SerializationFormat format) throws java.io.IOException, SerializerConstructionException, SerializationException
file
- filebinding
- startPos
- The position of the first sample in fileformat
- serialization format
java.io.IOException
SerializerConstructionException
- could not create serializer, never thrown with BinarySerializationFormat
SerializationException
- Error with the file, could not build entry indexMethod Detail |
---|
public void close()
close
in interface IFileList<T>
close
in class RandomAccessBinaryList<T>
public java.io.File getFile()
IFileList
getFile
in interface IFileList<T>
getFile
in class RandomAccessBinaryList<T>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |