Key |
Description |
---|---|
|
The String returned designates the version of the Mobile Scalable 2D Vector Graphics API specification that is implemented. It is "1.1" for this version of the specification. |
|
The String returned indicates the base Profile of SVG that is supported by the underlying implementation. It is "tiny" for this version of the specification. |
|
The String returned indicates the version of SVG that is supported by the underlying implementation. It is "1.1" for this version of the specification. |
JSR226 does not define any security mechanism. Rather, implementations of JSR226 API is subject to the security mechanisms provided by the underlying profile and configuration, for example OMA DRM.
The Scalable 2D Vector Graphics API can be used to access OMA DRM protected files, for example, SVG files, SVG or raster image resources. The table below defines the access modes available in certain security domains.
DRM mode |
Manufacturer |
Operator |
Trusted third-party |
Untrusted |
---|---|---|---|---|
Decrypted |
Yes |
No |
No |
No |
Encrypted mode |
No |
No |
No |
No |
Default mode |
Yes |
Yes |
Yes |
Yes |
The DRM mode also applies for the opening of the external resources
by the ExternalResourceHandler
. Therefore, the DRM parameters used for opening the SVG file
are appended to the resource URI parameter of ExternalResourceHandler.requestResource()
.
The DRM encrypted mode is not supported and java.lang.IllegalArgumentException
is
thrown.
When a MIDlet uses a default mode URL in the Scalable 2D Graphics API,
access to SVG document via DOM API is not allowed, and java.lang.SecurityException
is
thrown. Only rendering of the content is allowed in the default DRM mode.
DRM preview mechanism is not available to MIDlets that do not belong
to the manufacturer security domain; java.lang.SecurityException
is
thrown.
The exception java.lang.SecurityException
is thrown
when a MIDlet tries to open a file but it does not have access rights for
it.
Svg file’s DRM purpose is “display” and MIME (Multipurpose Internet Mail Extensions) is “image/svg+xml”.
A ScalableImage
can be created from a SVG file
within JAR via ScalableImage.createImage(String, ExternalResourceHandler)
call
only if it is referenced by absolute path. For example, ScalableImage.createImage("/foo.svg",
null);
The default external resource handler will not fetch any
resource when the ScalableImage
is created from a stream.
No exception is thrown in case a resource could not be open.
Calling ScalableGraphics.setRenderQuality(int mode)
does
not have any effect on changing the rendering quality. Only the high quality
is used for rendering.
Drawing on the bound Graphics
instance (via the Graphics
class)
between bindTarget()
and releaseTarget()
calls
will also become visible. This is due to the method ScalableGraphics.render()
that
already flushes the SVG content onto the bound target. However, the content
does not become visible due to the internal double buffering mechanism implemented
in Canvas
and GameCanvas
classes