Overview
This class represents a stored entity on the platform. Typically, this can be equated to a file, although no guarantee is made as to the storage mechanism or implementation. The storage lifetime of a resource is until it is deleted, either by the application or by the user. Therefore, data saved during one run of an application should be available upon the next run; this is not considered a cache storage mechanism.
The maxLength
of a resource can be set, although the resultant value
may differ from what was requested. Maximum sizes are governed by platform
limits as well as available storage space.
See Also:
Storage
Profile: common
Variable Summary
access | name | type | Can Read | Can Init | Can Write | Default Value | description |
---|---|---|---|---|---|---|---|
public-read protected | length | Long | subclass | subclass |
The current size of the resource in bytes. |
||
public | maxLength | Long |
The maximum size of the resource, in bytes. The maximum size of the resource, in bytes. Use this variable to adjust the maximum size allowable for this individual resource. |
||||
public-read protected | name | String | subclass | subclass |
The base name of resource. The base name of resource. Note that no path information is available from this object. |
||
public-read protected | readable | Boolean | subclass | subclass |
Indicates whether reading from the resource is allowed. |
||
public-read protected | writable | Boolean | subclass | subclass |
Indicates whether writing to the resource is allowed. |
Inherited Variables
Function Summary
- public openInputStream() : java.io.InputStream
- public openOutputStream(overwrite: Boolean) : java.io.OutputStream
-
Opens an
OutputStream
to the resource.Opens an
OutputStream
to the resource. The amount of data that can be written to the stream may be restricted.-
Parameters
- overwrite
- Whether to overwrite existing data, if any, as opposed to appending to existing data.
-
Returns
- OutputStream
- An OutputStream for the Resource.