Microsoft SDK for Java

openWritable

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

openWritable(String stgfilename, int flags)
openWritable(String stgfilename)
openWritable(String stgfilename, boolean append)

openWritable(String stgfilename, int flags)

Opens a file for writing from the store for the current principal. If the file already exists, it is truncated unless the ClientStore.OPEN_FL_APPEND flag is provided.

Syntax

public static OutputStream openWritable(String stgfilename, int flags) throws IOException;

Return Value

Returns the output stream that is open for writing.

Parameters

stgfilename The name of the file to open for writing.
flags A value that indicates the requested type of file accessibility. This value can be any combination of the flags OPEN_FL_APPEND, OPEN_FL_SHARED, STORE_FL_ROAMING, or STORE_FL_LOCAL from the ClientStore class.

Exceptions

IOException if the file could not be created or truncated.

openWritable(String stgfilename)

Opens a file for writing from the store for the current principal. If the file already exists, it is truncated.

Syntax

public static OutputStream openWritable(String stgfilename) throws IOException;

Return Value

Returns the file that is open for writing.

Parameters

stgfilename The name of the storage file to open.

Exceptions

IOException if the file could not be created or truncated.

openWritable(String stgfilename, boolean append)

Opens a file for writing from the store for the current principal. If the file already exists, it is truncated or appended.

Syntax

public static OutputStream openWritable(String stgfilename, boolean append) throws IOException;

Return Value

Returns the file that is open for writing.

Parameters

stgfilename The name of the storage file to open.
append The value that indicates whether to append to an existing file. If the value is true, append to the existing file; otherwise, do not append.

Exceptions

IOException if the file could not be created or truncated.

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