Methods Summary |
---|
public void | connect()
if (connected)
return;
connected = true;
|
public void | disconnect()
try{
if (started)
stop();
}catch (IOException e){}
connected = false;
|
public java.lang.String | getContentType()
if (!connected){
System.err.println("Error: DataSource not connected");
return null;
}
return contentType;
|
public java.lang.Object | getControl(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;
|
public javax.media.Time | getDuration()
return duration;
|
public void | start()
// we need to throw error if connect() has not been called
if (!connected)
throw new java.lang.Error("DataSource must be connected before it can be started");
if (started)
return;
started = true;
|
public void | stop()
if ((!connected) || (!started))
return;
started = false;
|