DOFCredentialswrite Method (String)OpenDOF Object Access Library
Write the DOFCredentials to a named file.

Namespace: org.opendof.core.oal
Assembly: dof-oal (in dof-oal.dll) Version: 7.0.1.2
Syntax

C#
public void write(
	string filename
)

Parameters

filename
Type: SystemString
The filename to which to write the DOFCredentials. Must not be null.
Exceptions

ExceptionCondition
ArgumentExceptionif filename is null.
FileNotFoundExceptionThe file could not be opened for write.
IOExceptionThe file could not be written.
SecurityExceptionIf a security manager exists and its checkWrite method denies write access to the file.
DOFException
Remarks

Write the DOFCredentials to a named file.

If the file already exists, it will be overwritten. If you don't want that, then check if it exists before calling this method. There is a race condition if you check for the file's existence and then call this method. Another thread may have created the file. If that is a problem, then create the file yourself with System.IO.File.createNewFile() and call write(System.IO.OutputStream) .

The written credential file is a form of a credential which could be used by anyone gaining access to the file to access systems as if they were the owner. Care should be taken to only create these files in secure settings.

See Also

Reference