<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

java.lang.String

(required)

name of variable to assign the wrapped object to

global

boolean

false

whether the variable should be global

declare

boolean

false

whether this is a declaration or assignment

buffered

boolean

false

whether the stream, reader or writer should be buffered

type

java.lang.String

(required)

one of: "input", "output" (these denote streams), "reader" or "writer"

path

java.lang.String

(required if resource not set)

of file to wrap

resource

java.lang.String

(required if path not set)

name of resource to wrap

bundleId

java.lang.String

(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"/>
  • No labels