Class FileSeekableInput

java.lang.Object
com.zakgof.velvetvideo.impl.FileSeekableInput
All Implemented Interfaces:
ISeekableInput, java.lang.AutoCloseable

public class FileSeekableInput
extends java.lang.Object
implements ISeekableInput
  • Constructor Summary

    Constructors 
    Constructor Description
    FileSeekableInput​(java.io.FileInputStream fis)  
  • Method Summary

    Modifier and Type Method Description
    void close()
    Closes the input stream and free the resources.
    int read​(byte[] bytes)
    Read bytes from the input stream into the bytes array.
    void seek​(long position)
    Seeks read pointer to the specified position.
    long size()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • read

      public int read​(byte[] bytes)
      Description copied from interface: ISeekableInput
      Read bytes from the input stream into the bytes array.
      Specified by:
      read in interface ISeekableInput
      Parameters:
      bytes - buffer to read data to
      Returns:
      number of bytes read.
    • seek

      public void seek​(long position)
      Description copied from interface: ISeekableInput
      Seeks read pointer to the specified position.
      Specified by:
      seek in interface ISeekableInput
      Parameters:
      position - offset from the stream start to put the read pointer
    • close

      public void close()
      Description copied from interface: ISeekableInput
      Closes the input stream and free the resources.
      Specified by:
      close in interface java.lang.AutoCloseable
      Specified by:
      close in interface ISeekableInput
    • size

      public long size()
      Specified by:
      size in interface ISeekableInput
      Returns:
      total number of bytes in this stream