Microsoft SDK for Java

openRandom

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

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

openRandom(String stgfilename, boolean writable)

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

Syntax

public 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 is to be opened as OPEN_FL_WRITABLE; otherwise, set this value to false.

Exceptions

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

openRandom(String stgfilename, int flags)

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

Syntax

public 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:

STORE_FL_LOCAL
STORE_FL_ROAMING
OPEN_FL_EXPENDABLE
OPEN_FL_WRITABLE
OPEN_FL_SHARED


Exceptions

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

openRandom(String stgfilename)

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

Syntax

public 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.

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