Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

Copyright © 2006 Sun Microsystems, Inc. All rights reserved.

JSR-927 (Maintenance Release)

javax.media.protocol
Interface SourceStream

All Superinterfaces:
Controls
All Known Subinterfaces:
PullSourceStream, 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. Some 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 javax.media.protocol.Controls
getControl, getControls
 

Field Detail

LENGTH_UNKNOWN

public static final long LENGTH_UNKNOWN
See Also:
Constant Field Values
Method Detail

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.

JSR-927 (Maintenance Release)

Copyright © 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

For more information, please consult the JSR 927 specification.