javax.media.protocol
Interface Seekable


public interface Seekable

A media object will implement this interface if it is capable of seeking to a particular position in the stream. The most common classes that implement Seekable are SourceStreams in DataSources and SourceTransferHandlers in DataSinks.

See Also:
PullSourceStream, SourceTransferHandler, DataSink

Method Summary
 boolean isRandomAccess()
          Find out if this media object can position anywhere in the stream.
 long seek(long where)
          Seek to the specified point in the stream.
 long tell()
          Obtain the current point in the stream.
 

Method Detail

seek

public long seek(long where)
Seek to the specified point in the stream.
Parameters:
where - The position to seek to.
Returns:
The new stream position.

tell

public long tell()
Obtain the current point in the stream.

isRandomAccess

public boolean isRandomAccess()
Find out if this media object can position anywhere in the stream. If the stream is not random access, it can only be repositioned to the beginning.
Returns:
Returns true if the stream is random access, false if the stream can only be reset to the beginning.


Submit a bug or feature
Copyright 1994-2004 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.