<wrap-resource>
Purpose/Function
Allows one to wrap a named local file or resource as a stream, reader or writer, and add it to the environment.
Attributes
NAME |
TYPE |
DEFAULT VALUE |
DESCRIPTION |
---|---|---|---|
name |
|
(required) |
name of variable to assign the wrapped object to |
global |
|
|
whether the variable should be global |
declare |
|
|
whether this is a declaration or assignment |
buffered |
|
|
whether the stream, reader or writer should be buffered |
type |
|
(required) |
one of: "input", "output" (these denote streams), "reader" or "writer" |
path |
|
(required if resource not set) |
of file to wrap |
resource |
|
(required if path not set) |
name of resource to wrap |
bundleId |
|
(required if running as a plug-in and using resource) |
id of the OSGI bundle (usually the Java package) in which to find the resource |
Elements
None.
ReturnValues
None.
Examples
<wrap-resource name="stream" declare="true" type="input" resource="review.txt"/> <wrap-resource name="reader" declare="true" type="reader" buffered="true" resource="review.txt"/>