Class VideoHandle.UrlVideoHandle

java.lang.Object
com.igrium.videolib.api.VideoHandle.UrlVideoHandle
All Implemented Interfaces:
VideoHandle
Enclosing interface:
VideoHandle

public static class VideoHandle.UrlVideoHandle extends Object implements VideoHandle
A video handle based on a given URL.
  • Constructor Details

    • UrlVideoHandle

      public UrlVideoHandle(URL url)
  • Method Details

    • getAddress

      public Optional<String> getAddress()
      Description copied from interface: VideoHandle
      Get an accessible URL that can be passed directly to a playback implementation.
      Specified by:
      getAddress in interface VideoHandle
      Returns:
      The address, or an empty optional if this video can only be accessed through the handle's openStream function.
    • openStream

      public InputStream openStream() throws IOException
      Description copied from interface: VideoHandle
      Open an input stream with the contents of this video file.
      Specified by:
      openStream in interface VideoHandle
      Returns:
      The input stream.
      Throws:
      IOException - If the stream cannot be opened.
    • toString

      public String toString()
      Overrides:
      toString in class Object