Open topic with navigation

TIBCO Rendezvous® 8.7.0

# 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()

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Rendezvous®

Copyright © 1997-2023. Cloud Software Group, Inc. All Rights Reserved.