org.deegree.services.wpvs.io.file
Class DataFile<T extends PositionableModel>
java.lang.Object
org.deegree.services.wpvs.io.file.DataFile<T>
- Type Parameters:
T
- to add to the file
public class DataFile<T extends PositionableModel>
- extends Object
The DataFile
class TODO add class documentation here.
- Version:
- $Revision: 29642 $, $Date: 2011-02-11 13:59:33 +0100 (Fri, 11 Feb 2011) $
- Author:
- Rutger Bezema, last edited by: $Author: lbuesching $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataFile
public DataFile(File dataFile,
ObjectSerializer<T> serializer)
throws IOException
- Parameters:
dataFile
- serializer
- to use for serialization.
- Throws:
IOException
get
public DataObjectInfo<T> get(long position)
throws IOException
- Parameters:
position
-
- Returns:
- the object from the file.
- Throws:
IOException
add
public long add(DataObjectInfo<T> object)
throws IOException
- Parameters:
object
-
- Returns:
- the position of the billboard in the data file.
- Throws:
IOException
close
public void close()
throws IOException
- Closes the file and writes all data to it.
- Throws:
IOException
getSize
public long getSize()
- Returns:
- the next write position.
getFileName
public String getFileName()
- Returns:
- the path of this datafile
Copyright © 2011. All Rights Reserved.