TibrvMsgEncoder.canEncode()

Method

Declaration

boolean canEncode(
    short type,
    java.lang.Object data)

Purpose

Test whether this encoder can encode the data as a particular wire format custom datatype.

Remarks

Before calling TibrvMsgEncoder.encode(), TibrvMsg first checks its applicability by calling this method. Whenever this method indicates that encoding is viable, TibrvMsgEncoder.encode() must correctly encode the object.

This method must return true if the encoder can encode the data into the specified custom datatype; otherwise it must return false.

Parameter

Description

type

Test viability of encoding the data as an instance of this custom datatype.

data

Test viability of encoding this data.

See Also

TibrvMsgEncoder.encode()