javax.media.protocol
Interface SourceStream
- All Known Subinterfaces:
- PullBufferStream, PullSourceStream, PushBufferStream, PushSourceStream
- public interface SourceStream
- extends Controls
Abstracts a single stream of media data.
Stream Controls
A SourceStream
might support an operation that
is not part of the SourceStream
definition.
For example a stream might support seeking to a particular byte
in the stream. In that case, it should implement the
Seekable
interface. Some streams allow its output
format to be changed. It should then implement the
Formattable
interface.
Many operations are dependent on the stream
data, and support cannot be determined until the stream is in
use.
To obtain all of the objects that provide control over a stream
use getControls
. To determine if a particular
kind of control is available, and obtain the object that
implements the control use getControl
.
- See Also:
DataSource
,
PushSourceStream
,
PullSourceStream
,
Seekable
LENGTH_UNKNOWN
public static final long LENGTH_UNKNOWN
getContentDescriptor
public ContentDescriptor getContentDescriptor()
- Get the current content type for this stream.
- Returns:
- The current
ContentDescriptor
for this stream.
getContentLength
public long getContentLength()
- Get the size, in bytes, of the content on this stream.
LENGTH_UNKNOWN is returned if the length is not known.
- Returns:
- The content length in bytes.
endOfStream
public boolean endOfStream()
- Find out if the end of the stream has been reached.
- Returns:
- Returns
true
if there is no more data.
Submit a bug or feature
Copyright 1999-2001 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved. See the Specification License for more details.
Sun, Sun Microsystems, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.