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 Positionable


public interface Positionable

A DataSource implements the Positionable interface if it supports changing the media position within the stream.

See Also:
Datasource

Field Summary
static int RoundDown
           
static int RoundNearest
           
static int RoundUp
           
 
Method Summary
 boolean isRandomAccess()
          Find out if this source can be repositioned to any point in the stream.
 Time setPosition(Time where, int rounding)
          Set the position to the specified time.
 

Field Detail

RoundUp

public static final int RoundUp
See Also:
Constant Field Values

RoundDown

public static final int RoundDown
See Also:
Constant Field Values

RoundNearest

public static final int RoundNearest
See Also:
Constant Field Values
Method Detail

setPosition

public Time setPosition(Time where,
                        int rounding)
Set the position to the specified time. Returns the rounded position that was actually set.

Parameters:
rounding - The rounding technique to be used: RoundUp, RoundDown, RoundNearest.
Returns:
The actual position set.

isRandomAccess

public boolean isRandomAccess()
Find out if this source can be repositioned to any point in the stream. If not, the source can only be repositioned to the beginning of the stream.

Returns:
Returns true if the source is random access; false if the source can only be reset to the beginning of the stream.

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.