|
FileConnection Optional Package 1.0 Final Release |
|||||||||
PREV NEXT | FRAMES NO FRAMES |
See:
Description
Packages | |
javax.microedition.io.file | This package describes file system access support based on the Generic
Connection Framework . |
This document, FileConnection Optional Package 1.0 Specification, defines the APIs that comprise the FileConnection optional package for Java 2 Platform, Micro Edition (J2ME).
This document defines a set of APIs known as the FileConnection APIs for Java 2 Platform, Micro Edition (J2ME). These APIs collectively are defined as an optional package. Optional packages are API sets that may be licensed and added on top of J2ME configuration and profile implementations by vendors independent of the JSR process. This allows VM implementations to increase the functionality they offer while still providing APIs that are defined as a standard by the Java community.
The FileConnection APIs were developed by as part of JSR 75. There is no dependency of these FileConnection APIs upon any other APIs produced in JSR 75, and the FileConnection APIs can be licensed and packaged separately from any other J2ME configuration, profile, or optional package.
This document and all associated documents are subject to the terms of the JCP agreements (i.e. JSPA and/or IEPA), available at http://www.jcp.org. The version of the Java Community Process (JCP) procedures followed is version 2.1, dated July 10, 2001.
This document uses definitions based upon those specified in IETF RFC 2119 (See http://www.ietf.org).
Table 2 Specification Terms
Term | Definition |
MUST | The associated definition is an absolute requirement of this specification. |
MUST NOT | The definition is an absolute prohibition of this specification. |
SHOULD | Indicates a recommended practice. There may exist valid reasons in particular circumstances to ignore this recommendation, but the full implications must be understood and carefully weighed before choosing a different course. |
SHOULD NOT | Indicates a non-recommended practice. There may exist valid reasons in particular circumstances when the particular behavior is acceptable or even useful, but the full implications should be understood and the case carefully weighed before implementing any behavior described with this label. |
MAY | Indicates that an item is truly optional. |
This specification used the following formatting conventions.
Table 3 Formatting Conventions
Convention | Description |
Courier |
Used in all Java code including keywords, data types, constants, method names, variables, class names, and interface names. |
Italic | Used for emphasis and to signify the first use of a term. |
The primary goal of the FileConnection APIs is to provide access to file systems on devices and/or mounted memory cards. File system connectivity through the Generic Connection Framework may be supported by an implementation if the target device has the necessary underlying operating system and hardware support for file systems. Connections to a file system may be opened to file systems located either on memory cards or in a devices memory, depending on device and operating system limitations. The types of memory cards that contain file systems and could be supported include:
CLDC 1.0 is the minimum required platform for this API set. The APIs in this package only depends on APIs required by the CLDC 1.0 API set. That allows the FileConnection APIs to be deployed as an optional API package on any J2ME profile that supports CLDC 1.0 or higher.
This section lists explicit requirements of this specification. Implementations of the FileConnection API must follow these requirements. Profiles including this FileConnection API package may require additional requirements above and beyond the ones listed here.
Compliant FileConnection API implementations:
Because of its optional nature, this package of APIs may not always be available
on every platform. Each profile and platform may have their own methods for
J2ME package discovery as there is no universal method existing at this
time. An additional method for package discovery of the FileConnection
APIs is by using a system properties query. To discover this package, call
System.getProperty
with a key of
microedition.io.file.FileConnection.version
. If the API
is present, the value returned is the version of the API (e.g. "1.0"). If the
API is not present then the key is also not present and
null
is returned.
In addition to the system property microedition.io.file.FileConnection.version
as defined above, FileConnection implementations must also support the system
property file.separator
. The file.separator
property
returns a string representing the file separator character(s) for the
underlying platform. For example, "\" would be returned on a
Windows OS based platform, and "/" would be returned on a Unix system.
It is the responsibility of the J2ME platform that the FileConnection APIs are deployed on to provide a security model supporting the security of the File Connection APIs. Specifically:
java.lang.SecurityException
is thrown from
the Connector.open()
method if the file, file system, or directory
is not allowed to be accessed.Connector.open()
)
and when opening a stream for the connection (in openInputStream(),
openDataInputStream(), openOutputStream(), and openDataOutputStream()
).The implementation of the security model is left up to the including profile or platform.
If the including profile is MIDP 2.0 (as defined by JSR 118), then included with this specification is an addendum outlining a Recommended Practice for using the FileConnection APIs within the MIDP 2.0 security model. That addendum can be found here.
Connector.open
implement
the javax.microedition.io.InputConnection
interface. The
FileConnection optional package class javax.microedition.io.file.FileConnection
implements StreamConnection and therefore InputConnection.
|
Final Release Rev. 1.00 |
|||||||||
PREV NEXT | FRAMES NO FRAMES |