FileDocCategorySizeDatePackage
BasicSourceStream.javaAPI DocJMF 2.1.1e1501Mon May 12 12:20:54 BST 2003com.sun.media.protocol

BasicSourceStream

public class BasicSourceStream extends Object implements SourceStream

Fields Summary
protected ContentDescriptor
contentDescriptor
protected long
contentLength
protected Object[]
controls
public static final int
LENGTH_DISCARD
Constructors Summary
public BasicSourceStream()


     
public BasicSourceStream(ContentDescriptor cd, long contentLength)

	this.contentDescriptor = cd;
	this.contentLength = contentLength;
    
Methods Summary
public booleanendOfStream()
Must override this class

	return false;
    
public javax.media.protocol.ContentDescriptorgetContentDescriptor()

	return contentDescriptor;
    
public longgetContentLength()

	return contentLength;
    
public java.lang.ObjectgetControl(java.lang.String controlType)

       try {
          Class  cls = Class.forName(controlType);
          Object cs[] = getControls();
          for (int i = 0; i < cs.length; i++) {
             if (cls.isInstance(cs[i]))
                return cs[i];
          }
          return null;

       } catch (Exception e) {   // no such controlType or such control
         return null;
       }
    
public java.lang.Object[]getControls()

	return controls;