Class IStreamReader

java.lang.Object
org.opencv.videoio.IStreamReader

public class IStreamReader extends Object
Read data stream interface
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final long
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    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
    protected
    IStreamReader(long addr)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    __fromPtr__(long addr)
     
    long
     
    long
    read(byte[] buffer, long size)
    Read bytes from stream
    long
    seek(long offset, int origin)
    Sets the stream position

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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__

      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 least size bytes
      size - 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 offset
      origin - SEEK_SET / SEEK_END / SEEK_CUR SEE: fseek
      Returns:
      automatically generated