Class SourceStreamDelegate<T extends javax.media.protocol.SourceStream>

  • Type Parameters:
    T - the very type of the SourceStream wrapped by SourceStreamDelegate
    All Implemented Interfaces:
    javax.media.Controls, javax.media.protocol.Controls, javax.media.protocol.SourceStream

    public class SourceStreamDelegate<T extends javax.media.protocol.SourceStream>
    extends Object
    implements javax.media.protocol.SourceStream
    Implements a SourceStream which wraps a specific SourceStream.
    Author:
    Lyubomir Marinov
    • Field Detail

      • stream

        protected final T extends javax.media.protocol.SourceStream stream
        The SourceStreamDelegate wrapped by this instance.
    • Constructor Detail

      • SourceStreamDelegate

        public SourceStreamDelegate​(T stream)
        Initializes a new SourceStreamDelegate instance which is to wrap a specific SourceStream.
        Parameters:
        stream - the SourceStream the new instance is to wrap
    • Method Detail

      • endOfStream

        public boolean endOfStream()
        Implements SourceStream.endOfStream(). Delegates to the wrapped SourceStream.
        Specified by:
        endOfStream in interface javax.media.protocol.SourceStream
        Returns:
        true if the wrapped SourceStream has reached the end the content it makes available
      • getContentDescriptor

        public javax.media.protocol.ContentDescriptor getContentDescriptor()
        Implements SourceStream.getContentDescriptor(). Delegates to the wrapped SourceStream.
        Specified by:
        getContentDescriptor in interface javax.media.protocol.SourceStream
        Returns:
        a ContentDescriptor which describes the content made available by the wrapped SourceStream
      • getContentLength

        public long getContentLength()
        Implements SourceStream.getContentLength(). Delegates to the wrapped SourceStream.
        Specified by:
        getContentLength in interface javax.media.protocol.SourceStream
        Returns:
        the length of the content made available by the wrapped SourceStream
      • getControl

        public Object getControl​(String controlType)
        Implements Controls.getControl(String). Delegates to the wrapped SourceStream.
        Specified by:
        getControl in interface javax.media.Controls
        Parameters:
        controlType - a String value which specifies the type of the control to be retrieved
        Returns:
        an Object which represents the control of the wrapped SourceStream of the specified type if such a control is available; otherwise, null
      • getControls

        public Object[] getControls()
        Implements Controls.getControls(). Delegates to the wrapped SourceStream.
        Specified by:
        getControls in interface javax.media.Controls
        Returns:
        an array of Objects which represent the controls available for the wrapped SourceStream