java.lang.Object
jreceiver.server.stream.capture.MusicInputStreamFactory
- public final class MusicInputStreamFactory
- extends java.lang.Object
This provides support for getting MusicInputStream objects. It stores them
and then returns the correct object at a later date. It can store multiple
MusicInputStream objects for a single URL -- think multiple players playing
the same stream. It serves up the object that has a correct offset. This is
not quite the optimal strategy -- it probably ought to preferentially return the stream
where the requested offset is at the 'end'.
- Version:
- $Revision: 1.8 $ $Date: 2002/12/29 00:44:07 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
table
private static java.util.Hashtable table
- A table of current MusicInputStream objects -- indexed by URL
log
protected static org.apache.commons.logging.Log log
- logging object
MusicInputStreamFactory
public MusicInputStreamFactory()
getStream
public static MusicInputStream getStream(java.net.URL url,
int pos,
java.lang.String mimeType)
throws java.io.IOException
- Obtains a MusicInputStream object for the requested URL
at the requested position. This allows us to disabiguate
two people asking for the same stream.
getStream
public static MusicInputStream getStream(java.net.URL url,
int pos,
java.lang.String mimeType,
java.lang.String srcMimeType)
throws java.io.IOException
- Obtains a MusicInputStream object for the requested URL
at the requested position. This allows us to disabiguate
two people asking for the same stream.
removeStream
public static void removeStream(java.net.URL url,
int pos)
removeMusicInputStream
public static void removeMusicInputStream(java.net.URL url,
MusicInputStream stream)
- Removes a music stream from the table. This is only called by the
MusicInputStream object itself on a timeout.