Package com.wowza.io

Interface IRandomAccessWriter2


public interface IRandomAccessWriter2
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the media asset
    boolean
    Does the media asset exist
    Get the basePath for the random access reader
    int
    Get the current direction hint for the random access reader.
    long
    Get the current byte location in the media asset
    Get the media extension
    Get the media name
    Get the unique path to the media asset item
    void
    init(IApplicationInstance appInstance, IMediaStream stream, String basePath, String mediaName, String mediaExtension)
    Intialize RandomAccessReader
    boolean
    Is the media asset open
    long
    Return the lastModified date (same format as File.lastModified)
    long
    Get the media asset length in bytes
    void
    Open the media asset
    void
    seek(long pos)
    Seek to a position in the media asset
    void
    setDirecton(int directon)
    Set the current direction hint
    void
    write(byte[] buf, int off, int len)
    Writes len bytes from the specified byte array starting at offset off to this file.
  • Field Details

  • Method Details

    • init

      void init(IApplicationInstance appInstance, IMediaStream stream, String basePath, String mediaName, String mediaExtension)
      Intialize RandomAccessReader
      Parameters:
      appInstance - application instance
      stream - parent stream if one exists
      basePath - basePath for IApplicationInstance
      mediaName - media name
      mediaExtension - media extension from mediaReaders
    • open

      void open() throws IOException
      Open the media asset
      Throws:
      IOException
    • close

      void close() throws IOException
      Close the media asset
      Throws:
      IOException
    • isOpen

      boolean isOpen()
      Is the media asset open
      Returns:
      true if media asset is open
    • getFilePointer

      long getFilePointer()
      Get the current byte location in the media asset
      Returns:
      current byte location in the media asset
    • seek

      void seek(long pos)
      Seek to a position in the media asset
      Parameters:
      pos - position to seek to
    • write

      void write(byte[] buf, int off, int len)
      Writes len bytes from the specified byte array starting at offset off to this file.
      Parameters:
      buf - the data.
      off - the start offset in the data.
      len - the number of bytes to write.
      Throws:
      IOException - if an I/O error occurs.
    • getDirecton

      int getDirecton()
      Get the current direction hint for the random access reader. The underlying system will call setDirection to hint at the current direction the media assets is being read.
      Returns:
      current direction hint for the random access reader
    • setDirecton

      void setDirecton(int directon)
      Set the current direction hint
      Parameters:
      directon - current direction hint for the random access reader
    • getBasePath

      String getBasePath()
      Get the basePath for the random access reader
      Returns:
      basePath for the random access reader
    • getMediaName

      String getMediaName()
      Get the media name
      Returns:
      media name
    • getMediaExtension

      String getMediaExtension()
      Get the media extension
      Returns:
      media extension
    • exists

      boolean exists()
      Does the media asset exist
      Returns:
      true if media assets exists
    • lastModified

      long lastModified()
      Return the lastModified date (same format as File.lastModified)
      Returns:
      lastModified date (same format as File.lastModified)
    • length

      long length()
      Get the media asset length in bytes
      Returns:
      media asset length in bytes
    • getPath

      String getPath()
      Get the unique path to the media asset item
      Returns:
      unique path to the media asset item