Microsoft SDK for Java

openRandom

The openRandom method of the ClientStorageManager Class contains the following signatures:

openRandom(String stgfilename, boolean writable)
openRandom(String stgfilename)
openRandom(String stgfilename, int flags)

openRandom(String stgfilename, boolean writable)

Opens a RandomAccessFile from the store for read or write operations.

Syntax

public static RandomAccessFile openRandom(String stgfilename, boolean writable) throws IOException;

Return Value

Returns the RandomAccessFile that is opened.

Parameters

stgfilename The name of the file to open.
writable Set this value to true if the file should be opened as OPEN_FL_WRITABLE; otherwise, set this value to false.

Exceptions

IOException if the method fails to open the specified file.

openRandom(String stgfilename)

Opens a RandomAccessFile from the store for read operations, with no specified flags.

Syntax

public static RandomAccessFile openRandom(String stgfilename) throws IOException;

Return Value

Returns the RandomAccessFile that is opened.

Parameters

stgfilename The name of the file to open.

Exceptions

IOException if the method fails to open the specified file.

openRandom(String stgfilename, int flags)

Opens a RandomAccessFile from the store for read or write operations.

Syntax

public static RandomAccessFile openRandom(String stgfilename, int flags) throws IOException;

Return Value

Returns the RandomAccessFile that is opened.

Parameters

stgfilename The name of the file to open.
flags A value that indicates the requested type of file accessibility. It can be any combination of the following accessibilities:

OPEN_FL_SHARED
OPEN_FL_EXPENDABLE
OPEN_FL_WRITABLE
STORE_FL_ROAMING
STORE_FL_LOCAL


Exceptions

IOException if the method fails to create or open the specified file.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.