com.davisor.data.stream
Interface DataBuffer

All Superinterfaces:
Data, DataSource
All Known Implementing Classes:
IndirectDataBuffer, JoinedDataBuffer, ListDataBuffer, SimpleDataBuffer, StreamDataSource

public interface DataBuffer
extends DataSource

DataBuffer defines an interface for data sources that can provide full random access to the elements they contain. All data buffers also have a well-known size. Any changes to the objects in the buffer will immediately reflect to all the data streams feeding from the data buffer, although some implementing classes may enforce different synchronization and scope policies.

Since:
JDK1.1
See Also:
Type

Method Summary
 DataValue getData(int index)
          Gets the specific data element from the data buffer.
 int getSize()
          Gets the number of data elements in the data buffer.
 DataStream getStream(boolean reversed)
          Gets a new data stream from the data source.
 
Methods inherited from interface com.davisor.data.stream.DataSource
close, getStream, toString
 
Methods inherited from interface com.davisor.data.Data
getType
 

Method Detail

getData

public DataValue getData(int index)
                  throws com.davisor.core.InvalidIndexException
Gets the specific data element from the data buffer.

Parameters:
index - data element index
Throws:
com.davisor.core.InvalidIndexException - if no data is bound to given index

getSize

public int getSize()
Gets the number of data elements in the data buffer.


getStream

public DataStream getStream(boolean reversed)
                     throws InvalidDataException
Gets a new data stream from the data source.

Parameters:
reversed - controls if stream reads buffer forwards or backwards
Throws:
InvalidDataException - if a new stream can not be created


Copyright © 2001-2004 Davisor Oy. All Rights Reserved.