framed
Class SimulatedFrameSource
java.lang.Object
framed.SimulatedFrameSource
- All Implemented Interfaces:
- FrameSource
public class SimulatedFrameSource
- extends java.lang.Object
- implements FrameSource
Use the SimulatedFrameReader to generate a FrameSource with a predefined
sequence of frame values. Usefull for debugging and testing.
- Author:
- sikoried
Method Summary |
int |
getFrameSize()
Return the length of the frames (needed for the read call) |
boolean |
read(double[] buf)
Read the next frame from the data array |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimulatedFrameSource
public SimulatedFrameSource(double[][] data)
- Generate a artificial sequence of frames
- Parameters:
data
-
getFrameSize
public int getFrameSize()
- Description copied from interface:
FrameSource
- Return the length of the frames (needed for the read call)
- Specified by:
getFrameSize
in interface FrameSource
read
public boolean read(double[] buf)
throws java.io.IOException
- Read the next frame from the data array
- Specified by:
read
in interface FrameSource
- Parameters:
buf
- buffer to save the frame; implementing objects may depend
on a constant dimensionduring subsequent calls
- Returns:
- true on success, false if the stream terminated before the window was filled
- Throws:
java.io.IOException