Package com.bc.ceres.binio
Interface DataContext
public interface DataContext
The context provides the means to read from or write to a random access stream or file.
 
 I/O performance my be tuned by setting the ceres.binio.segmentSizeLimit system property
 to the size (in bytes) of data segments shared by multiple subsequent compounds members.
- Since:
- Ceres 0.8
- Version:
- $Revision$ $Date$
- 
Method SummaryModifier and TypeMethodDescriptionCreates an instance of a compound with I/O starting at the beginning of the stream or file.createData(long position) Creates an instance of a compound with the given type and with I/O starting at the given stream or file position.createData(CompoundType type, long position) Creates an instance of a compound with the given type and with I/O starting at the given stream or file position.voiddispose()Disposes this context and releases all associated resources.getData()Gets an instance of a compound with I/O starting at the given stream or file position.
- 
Method Details- 
getFormatDataFormat getFormat()- Returns:
- the file format.
 
- 
getHandlerIOHandler getHandler()- Returns:
- the associated I/O-handler used to read from or write to a random access stream or file.
 
- 
getDataCompoundData getData()Gets an instance of a compound with I/O starting at the given stream or file position. The type of the compound is the same as the format's compound type. In contrast tocreateData(), the method will always return the same compound instance.- Returns:
- The instance of a data compound.
- See Also:
 
- 
createDataCompoundData createData()Creates an instance of a compound with I/O starting at the beginning of the stream or file.- Returns:
- An instance of a data compound.
- See Also:
 
- 
createDataCreates an instance of a compound with the given type and with I/O starting at the given stream or file position.- Parameters:
- position- The file position in bytes.
- Returns:
- An instance of a data compound.
- See Also:
 
- 
createDataCreates an instance of a compound with the given type and with I/O starting at the given stream or file position.- Parameters:
- type- The compound type.
- position- The file position in bytes.
- Returns:
- An instance of a data compound.
 
- 
disposevoid dispose()Disposes this context and releases all associated resources.
 
-