Class IStreamReader
java.lang.Object
org.opencv.videoio.IStreamReader
Read data stream interface
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor 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
Modifier and TypeMethodDescriptionstatic IStreamReader__fromPtr__(long addr) longlongread(byte[] buffer, long size) Read bytes from streamlongseek(long offset, int origin) Sets the stream position
-
Field Details
-
nativeObj
protected final long nativeObj
-
-
Constructor Details
-
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 Details
-
getNativeObjAddr
public long getNativeObjAddr() -
__fromPtr__
-
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
-