Package org.opencv.videoio
Class IStreamReader
- java.lang.Object
-
- org.opencv.videoio.IStreamReader
-
public class IStreamReader extends java.lang.Object
Read data stream interface
-
-
Field Summary
Fields Modifier and Type Field Description protected long
nativeObj
-
Constructor Summary
Constructors Modifier Constructor Description 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 degradationprotected
IStreamReader(long addr)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IStreamReader
__fromPtr__(long addr)
protected void
finalize()
long
getNativeObjAddr()
long
read(byte[] buffer, long size)
Read bytes from streamlong
seek(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 leastsize
bytessize
- 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:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
-