jAER project on SourceForge

net.sf.jaer.eventio
Interface AEFileInputStreamInterface

All Superinterfaces:
InputDataFileInterface
All Known Implementing Classes:
AEFileInputStream, AEViewer.AEPlayer

public interface AEFileInputStreamInterface
extends InputDataFileInterface

The capabilities of the AEFileInputStream. Used in players that use these input streams. This interface can rewind, go forwards as well as backwards, etc, as when reading from a file.

Author:
tobi

Method Summary
 boolean isNonMonotonicTimeExceptionsChecked()
          Checking for wrapped time exceptions can be disabled for reasons of speed or corrupted data files.
 AEPacketRaw readPacketByNumber(int n)
          Reads a raw event packet of n events
 AEPacketRaw readPacketByTime(int dt)
          returns an AEPacketRaw at least dt long up to the max size of the buffer or until end-of-file.
 void setNonMonotonicTimeExceptionsChecked(boolean yes)
          Sets whether the input stream is checked for timestamp nonmonotonicity.
 
Methods inherited from interface net.sf.jaer.eventio.InputDataFileInterface
getFractionalPosition, mark, position, position, rewind, setFractionalPosition, size, unmark
 

Method Detail

readPacketByNumber

AEPacketRaw readPacketByNumber(int n)
                               throws java.io.IOException
Reads a raw event packet of n events

Parameters:
n - the number of events to read
Throws:
java.io.IOException - if there is a problem, e.g. end of file

readPacketByTime

AEPacketRaw readPacketByTime(int dt)
                             throws java.io.IOException
returns an AEPacketRaw at least dt long up to the max size of the buffer or until end-of-file. Events are read as long as the timestamp until (and including) the event whose timestamp is greater (for dt>0) than startTimestamp+dt, where startTimestamp is the last timestamp from the previous call.

Parameters:
dt - the timestamp different in units of the timestamp (usually us)
Returns:
the packet, always at least one event even if there is no event in the interval dt.
Throws:
java.io.IOException - if there is any problem

isNonMonotonicTimeExceptionsChecked

boolean isNonMonotonicTimeExceptionsChecked()
Checking for wrapped time exceptions can be disabled for reasons of speed or corrupted data files.

Returns:
true if exceptions are checked (default)

setNonMonotonicTimeExceptionsChecked

void setNonMonotonicTimeExceptionsChecked(boolean yes)
Sets whether the input stream is checked for timestamp nonmonotonicity.

Parameters:
yes - true to check (default).

jAER project on SourceForge