com.davisor.data.stream
Class ReversedDataBuffer

java.lang.Object
  extended bycom.davisor.data.stream.IndirectDataBuffer
      extended bycom.davisor.data.stream.ReversedDataBuffer
All Implemented Interfaces:
Data, DataBuffer, DataSource

public class ReversedDataBuffer
extends IndirectDataBuffer

ReversedDataBuffer implements a reversed view to the underlying data buffer. The underlying data buffer is reversed in row order, that is the first row of the underlying data buffer is the last row of this buffer and vice versa.

Since:
JDK1.2
See Also:
Type

Field Summary
 
Fields inherited from class com.davisor.data.stream.IndirectDataBuffer
M_dataBuffer
 
Constructor Summary
ReversedDataBuffer(DataBuffer dataBuffer)
          Constructs a new ReversedDataBuffer from the given DataBuffer.
 
Method Summary
 DataValue getData(int index)
          Gets the specific data element from the data buffer.
 DataStream getStream(boolean reversed)
          Gets a new data stream from the data source.
 
Methods inherited from class com.davisor.data.stream.IndirectDataBuffer
close, equals, getSize, getStream, getType, hashCode, toString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReversedDataBuffer

public ReversedDataBuffer(DataBuffer dataBuffer)
Constructs a new ReversedDataBuffer from the given DataBuffer.

Method Detail

getData

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

Specified by:
getData in interface DataBuffer
Specified by:
getData in class IndirectDataBuffer
Parameters:
index - data element index
Throws:
com.davisor.core.InvalidIndexException - if no data is bound to given index

getStream

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

Specified by:
getStream in interface DataBuffer
Specified by:
getStream in class IndirectDataBuffer
Parameters:
reversed - controls if stream reads buffer forwards or backwards
Throws:
InvalidDataException


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