Package org.opencv.videoio
Class IStreamReader
- java.lang.Object
-
- org.opencv.videoio.IStreamReader
-
public class IStreamReader extends java.lang.ObjectRead data stream interface
-
-
Field Summary
Fields Modifier and Type Field Description protected longnativeObj
-
Constructor Summary
Constructors Modifier Constructor Description protectedIStreamReader()Constructor of streaming callback object with abstract 'read' and 'seek' methods that should be implemented in Java code.
NOTE: Implemented callbacks should be called from the creation thread to avoid JNI performance degradationprotectedIStreamReader(long addr)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IStreamReader__fromPtr__(long addr)protected voidfinalize()longgetNativeObjAddr()longread(byte[] buffer, long size)Read bytes from streamlongseek(long offset, int origin)Sets the stream position
-
-
-
Constructor Detail
-
IStreamReader
protected IStreamReader(long addr)
-
IStreamReader
protected IStreamReader()
Constructor of streaming callback object with abstract 'read' and 'seek' methods that should be implemented in Java code.
NOTE: Implemented callbacks should be called from the creation thread to avoid JNI performance degradation
-
-
Method Detail
-
getNativeObjAddr
public long getNativeObjAddr()
-
__fromPtr__
public static IStreamReader __fromPtr__(long addr)
-
read
public long read(byte[] buffer, long size)Read bytes from stream- Parameters:
buffer- already allocated buffer of at leastsizebytessize- maximum number of bytes to read- Returns:
- actual number of read bytes
-
seek
public long seek(long offset, int origin)Sets the stream position- Parameters:
offset- Seek offsetorigin- SEEK_SET / SEEK_END / SEEK_CUR SEE: fseek- Returns:
- automatically generated
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
-