<read>
Purpose/Function
Reads the indicated number of bytes into a String buffer, starting at the given offset.
NOTE: for scalability, one can use the <read-from-stream>
task.
Attributes
NAME | TYPE | DEFAULT VALUE | DESCRIPTION |
---|---|---|---|
path |
| required | file to read |
offset |
| 0 | read from this byte |
numBytes |
| -1 | read this many bytes (-1 = up to the end of the file) |
asByteArray |
|
| return bytes as an array; otherwise, return |
Elements
None.
ReturnValues
DEFAULT NAME | TYPE | DESCRIPTION |
---|---|---|
fileContents |
| the read contents |
Examples
Code Block | ||||
---|---|---|---|---|
| ||||
... <read path="${init.file}" offset="$E{10 * 1024}" numBytes="$E{20 * 1024}" asByteArray="true"> <return-value defaultName="fileContents" assignedName="variableArray"/> </read> ... |