Flutter Engine
The Flutter Engine
|
Public Member Functions | |
ByteBuffer | encodeMessage (@Nullable T message) |
T | decodeMessage (@Nullable ByteBuffer message) |
A message encoding/decoding mechanism.
Both operations throw IllegalArgumentException
, if conversion fails.
Definition at line 15 of file MessageCodec.java.
T io.flutter.plugin.common.MessageCodec< T >.decodeMessage | ( | @Nullable ByteBuffer | message | ) |
Decodes the specified message from binary.
Warning: The ByteBuffer is "direct" and it won't be valid beyond this call. Storing the ByteBuffer and using it later and will lead to a java.nio.BufferUnderflowException
. If you want to retain the data you'll need to copy it.
message | the ByteBuffer message, possibly null. |
ByteBuffer io.flutter.plugin.common.MessageCodec< T >.encodeMessage | ( | @Nullable T | message | ) |
Encodes the specified message into binary.
message | the T message, possibly null. |