Activity - bytesToTempFile

Activity Type: Transformation

Description

Writes a stream of bytes to a temporary file and then outputs a reference to this temporary file.

This activity is useful when uploading large binary objects to relational databases. The SQLUpdateStatement activity accepts the output of this activity as an input to a parameterised query. In this context the important feature of the activity is that it converts multiple input blocks into a single output block. The output block is a file reference rather than a single byte array because it is undesirable to hold all the bytes of a large binary object in memory at the one time. By outputting a reference to a file the activity next in the chain can choose to stream data from this file.

Example

<bytesToTempFile name="myActivityInstance">
  <input  from="inputStream"/>
  <output name="outputStream"/>
</bytesToTempFile>

Specification

Element bytesToTempFile:

Input and Output Types

Data Resource Accessor

This activity can operate with any data resource accessor.

XML Schema

OGSA-DAI/schema/ogsadai/xsd/activities/bytes_to_temp_file.xsd

Class

uk.org.ogsadai.activity.transform.BytesToTempFileActivity

Client Toolkit Class

uk.org.ogsadai.client.toolkit.activity.transform.BytesToTempFile