Class and interface description

javax.microedition.io.Connector

The class is supported in as specified in File API, with the following clarification for the following method:

open(String name, int mode, Boolean timeouts)

Parameter name

Parameter values

Clarification

timeouts

Boolean

The value of this parameter is not taken into account by the S60 implementation: the S60 implementation always throws InterruptedIOExceptions in case of timeouts.

See also section 'Directory and file access restrictions' under the section Security settings.

An URI which has more than one non-created directories can be passed to the Connector.open() method. All directories in the upper level have to exists when endpoint is created (mkdir() or create() operations is called), however.

javax.microedition.io.file.FileConnection

void setReadable( boolean readable )

In S60 this operation does nothing, because the Symbian OS file system does not support a read attribute.

boolean canRead()

In S60, this operation always returns true because the Symbian OS file system does not support a read attribute.

long lastModified()

In S60, if you create a new subdirectory, the modified time stamp of the parent directory does not change, because the Symbian OS FAT file system does not change the modified time in this case.

java.util.Enumeration list()

The list() operation returns the same list of files and directories regardless of whether a connection has been established using READ, WRITE, or READ_WRITE modes.

InputStream and OutputStream

Only one InputStream and OutputStream can be open at the same time for a single FileConnection.

OutputStream is opened with an exclusive mode. This means that other connections cannot share the same endpoint. InputStream is opened in the shared mode if the connection mode is READ.

In S60, a new InputStream has to be opened to see the changes made by OutputStream if the InputStream has already encountered EOF (end-of-file).

Example 1:

FileConnection fc1 = Connector.open("file:///e:/afile.txt", Connector.READ );
fc1.openInputStream();
FileConnection fc2 = Connector.open("file:///e:/afile.txt", Connector.READ_WRITE);
fc2.openInputStream(); // throw an IOException.

Example 2:

FileConnection fc1 = Connector.open("file:///e:/afile.txt", Connector.READ );
fc1.openInputStream();
FileConnection fc2 = Connector.open("file:///e:/afile.txt", Connector.READ);
fc2.openInputStream(); // No exception

javax.microedition.io.file.FileSystemListener

In S60, FileSystemListener gets notifications only when a file system root is added to the device, not when file system roots are removed.

javax.microedition.io.file.FileSystemRegistry

java.util.Enumeration listRoots()

In S60, the method returns both virtual and physical roots, for example c:/ , e:/ , Internal/ , Memory card/. For more information on virtual roots, see Virtual file system.