FreeHEP API
Version current

org.freehep.record.source
Interface RandomAccessRecordSource

All Superinterfaces:
SequentialRecordSource
All Known Subinterfaces:
TaggedRecordSource

public interface RandomAccessRecordSource
extends SequentialRecordSource

A record source which (efficiently) supports random access.

Version:
$Id: RandomAccessRecordSource.java,v 1.1 2003/03/10 21:56:05 tonyj Exp $
Source Code:
RandomAccessRecordSource.java

Field Summary
 
Fields inherited from interface org.freehep.record.source.SequentialRecordSource
UNKNOWN
 
Method Summary
 int currentIndex()
          Return the index of the current record.
 void goToRecord(int index)
          Go to a specific record, specified by index.
 
Methods inherited from interface org.freehep.record.source.SequentialRecordSource
close, getCurrentRecord, getEstimatedSize, getRecordClass, getSourceName, next, releaseRecord, rewind
 

Method Detail

goToRecord

public void goToRecord(int index)
                throws NoSuchRecordException
Go to a specific record, specified by index.

Parameters:
index - The index of the record to access (numbered from 0).
Throws:
NoSuchRecordException - If the specified record does not exist.

currentIndex

public int currentIndex()
Return the index of the current record.


FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.