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

Field Summary
static long LENGTH_UNKNOWN
Method Summary
 boolean endOfStream()
          Find out if the end of the stream has been reached.
 ContentDescriptor getContentDescriptor()
          Get the current content type for this stream.
 long getContentLength()
          Get the size, in bytes, of the content on this stream.
Methods inherited from interface
getControl, getControls

Field Detail


public static final long LENGTH_UNKNOWN
Method Detail


public ContentDescriptor getContentDescriptor()
Get the current content type for this stream.
The current ContentDescriptor for this stream.


public long getContentLength()
Get the size, in bytes, of the content on this stream. LENGTH_UNKNOWN is returned if the length is not known.
The content length in bytes.


public boolean endOfStream()
Find out if the end of the stream has been reached.
Returns true if there is no more data.

Submit a bug or feature
Copyright 1999-2000 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.