net.rim.device.api.io
Interface Seekable


public interface Seekable

Implemented by some InputStreams and Readers so the read/write position can be adjusted.

Since:
BlackBerry API 5.0.0

Method Summary
 long getPosition()
          Return the current position in the stream.
 void setPosition(long position)
          Set the current position in the stream.
 



Method Detail

getPosition

long getPosition()
                 throws IOException
Return the current position in the stream. If the file is encrypted the position returned will be relative to where the application data begins.

Returns:
The position within the stream.
Throws:
IOException - if the position can not be obtained.
Since:
BlackBerry API 5.0.0

setPosition

void setPosition(long position)
                 throws IOException
Set the current position in the stream. If the file is encrypted the position should be relative to where the application data begins.

Parameters:
position - The new position within the stream.
Throws:
IOException - if the position can not be set.
Since:
BlackBerry API 5.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.