Developing OTDs for Application Adapters

marshal(OtdOutputStream out, String charset) Method

The marshal(OtdOutputStream out, String charset) method flows data out from the OTD to the supplied stream object, using the specified charset encoding. The given encoding acts as a temporary override to the OTD’s current encoding, it does not become the current encoding (see setEncoding and unmarshal documentation for information).

If the specified charset is not compatible with the OTD content (this can happen when the data was unmarshaled to the OTD using a different encoding), com.stc.otd.runtime.MarshalException occurs. If the encoding is not supported or recognized, java.io.UnsupportedEncodingException is generated.

Table 1–5 marshal(OtdOutputStream out, String charset) Method

Syntax 

Throws 

Examples 

void marshal(OtdOutputStream stream, String charset) 

MarshalException, IOException, UnsupportedEncodingException