Motorola E680 Technical Manual - Page 65

File System Access API

Page 65 highlights

16 File System Access API 16 File System Access API The File System Access API for the Motorola E680 handset is intended to allow J2ME applications access to files that are stored on the handsets. Internal file systems can be accessed via the File System Access API. Please note that the maximum file name length supported by Motorola is 36 characters. File Connection Methods The File System Access API will provide file connections provided there is underlying hardware and OS support on the handset. If file connections are not supported, attempts to open a file connection through Connector.open() will throw javax.micdoedition.io.ConnectionNotFoundException. Establishing a Connection To establish a connection, the format of the Connector.open() input string used to access a File Connection will follow the format described in the file URL format as part of IETF RFCs 1738 and 2386. These IETF RFCs dictate that a file URL will take the following form: • file:/// In the format shown above, the following definitions will be used: • - fully qualified domain name of the system on which the is accessible • - a hierarchical directory path of the form ///...// For successful implementation, will be the empty string. This is read as the machine from which the URL is being interpreted. This type of file connection only supports file access to files contained on a device or one of its attached memory cards. This type of file connections does not support access to files on a remote file system. Attempts to open a remote file system connection with Connector.open() will throw a javax.microedition.io.IOException. 65

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107

16
File System Access API
65
16
File System Access API
The File System Access API for the Motorola E680 handset is intended to allow J2ME
applications access to files that are stored on the handsets. Internal file systems can be
accessed via the File System Access API. Please note that the maximum file name length
supported by Motorola is 36 characters.
File Connection Methods
The File System Access API will provide file connections provided there is underlying
hardware and OS support on the handset. If file connections are not supported, attempts
to open a file connection through
Connector.open()
will throw
javax.micdoedition.io.ConnectionNotFoundException.
Establishing a Connection
To establish a connection, the format of the
Connector.open()
input string used to
access a File Connection will follow the format described in the file URL format as part of
IETF RFCs 1738 and 2386. These IETF RFCs dictate that a file URL will take the
following form:
file://<host>/<path>
In the format shown above, the following definitions will be used:
<host> - fully qualified domain name of the system on which the
<path>
is
accessible
<path> - a hierarchical directory path of the form
<root>/<directory>/<directory>/…/<name>/
For successful implementation,
<host>
will be the empty string. This is read as the
machine from which the URL is being interpreted. This type of file connection only
supports file access to files contained on a device or one of its attached memory cards.
This type of file connections does not support access to files on a remote file system.
Attempts to open a remote file system connection with
Connector.open()
will
throw a
javax.microedition.io.IOException
.