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-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal