|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectio.FrameReader
public class FrameReader
Read frames from a file or stdin (unlabeled feature data), first int (4byte) is the frame size.
Constructor Summary | |
---|---|
FrameReader()
|
|
FrameReader(java.lang.String fileName)
|
|
FrameReader(java.lang.String fileName,
boolean ufv,
int fs)
|
Method Summary | |
---|---|
void |
close()
Close the FrameReader's input file |
int |
getFrameSize()
Return the size of the output frames |
static void |
main(java.lang.String[] args)
|
boolean |
read(double[] buf)
Read the next frame, convert the raw data to doubles |
static boolean |
readDoubleArray(java.io.InputStream is,
double[] buf)
Read a double array from the given input stream (expects raw doubles...) |
static boolean |
readUFVArray(java.io.InputStream is,
double[] buf)
|
java.lang.String |
toString()
Return a String representation of the FrameSource |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FrameReader() throws java.io.IOException
java.io.IOException
public FrameReader(java.lang.String fileName) throws java.io.IOException
java.io.IOException
public FrameReader(java.lang.String fileName, boolean ufv, int fs) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void close() throws java.io.IOException
java.io.IOException
public int getFrameSize()
getFrameSize
in interface FrameSource
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
public boolean read(double[] buf) throws java.io.IOException
read
in interface FrameSource
buf
- buffer to save the frame; implementing objects may depend
on a constant dimensionduring subsequent calls
java.io.IOException
public static boolean readDoubleArray(java.io.InputStream is, double[] buf) throws java.io.IOException
is
- InputStream to usebuf
- Buffer to save values to
java.io.IOException
public static boolean readUFVArray(java.io.InputStream is, double[] buf) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
FrameSource
toString
in interface FrameSource
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |