Flutter Engine
The Flutter Engine
|
Public Member Functions | |
ByteBuffer | encodeMethodCall (@NonNull MethodCall methodCall) |
MethodCall | decodeMethodCall (@NonNull ByteBuffer message) |
ByteBuffer | encodeSuccessEnvelope (@Nullable Object result) |
ByteBuffer | encodeErrorEnvelope ( @NonNull String errorCode, @Nullable String errorMessage, @Nullable Object errorDetails) |
ByteBuffer | encodeErrorEnvelopeWithStacktrace ( @NonNull String errorCode, @Nullable String errorMessage, @Nullable Object errorDetails, @Nullable String errorStacktrace) |
Object | decodeEnvelope (@NonNull ByteBuffer envelope) |
ByteBuffer | encodeMethodCall (@NonNull MethodCall methodCall) |
MethodCall | decodeMethodCall (@NonNull ByteBuffer methodCall) |
ByteBuffer | encodeSuccessEnvelope (@Nullable Object result) |
ByteBuffer | encodeErrorEnvelope ( @NonNull String errorCode, @Nullable String errorMessage, @Nullable Object errorDetails) |
ByteBuffer | encodeErrorEnvelopeWithStacktrace ( @NonNull String errorCode, @Nullable String errorMessage, @Nullable Object errorDetails, @Nullable String errorStacktrace) |
Object | decodeEnvelope (@NonNull ByteBuffer envelope) |
Static Public Attributes | |
static final JSONMethodCodec | INSTANCE = new JSONMethodCodec() |
Package Functions | |
Object | unwrapNull (Object value) |
A MethodCodec
using UTF-8 encoded JSON method calls and result envelopes.
This codec is guaranteed to be compatible with the corresponding JSONMethodCodec on the Dart side. These parts of the Flutter SDK are evolved synchronously.
Values supported as methods arguments and result payloads are those supported by JSONMessageCodec
.
Definition at line 24 of file JSONMethodCodec.java.
|
inline |
Decodes a result envelope from binary.
envelope | the binary encoding of a result envelope as a ByteBuffer . |
FlutterException | if the envelope was an error envelope. |
Implements io.flutter.plugin.common.MethodCodec.
Definition at line 96 of file JSONMethodCodec.java.
|
inline |
Decodes a message call from binary.
methodCall | the binary encoding of the method call as a ByteBuffer . |
MethodCall
representation of the bytes between the given buffer's current position and its limit. Implements io.flutter.plugin.common.MethodCodec.
Definition at line 45 of file JSONMethodCodec.java.
|
inline |
Encodes an error result into a binary envelope message.
errorCode | An error code String. |
errorMessage | An error message String, possibly null. |
errorDetails | Error details, possibly null. Consider supporting Throwable in your codec. This is the most common value passed to this field. |
ByteBuffer
containing the encoding between position 0 and the current position. Implements io.flutter.plugin.common.MethodCodec.
Definition at line 70 of file JSONMethodCodec.java.
|
inline |
Encodes an error result into a binary envelope message with the native stacktrace.
errorCode | An error code String. |
errorMessage | An error message String, possibly null. |
errorDetails | Error details, possibly null. Consider supporting Throwable in your codec. This is the most common value passed to this field. |
errorStacktrace | Platform stacktrace for the error. possibly null. |
ByteBuffer
containing the encoding between position 0 and the current position. Implements io.flutter.plugin.common.MethodCodec.
Definition at line 81 of file JSONMethodCodec.java.
|
inline |
Encodes a message call into binary.
methodCall | a MethodCall . |
ByteBuffer
containing the encoding between position 0 and the current position. Implements io.flutter.plugin.common.MethodCodec.
Definition at line 32 of file JSONMethodCodec.java.
|
inline |
Encodes a successful result into a binary envelope message.
result | The result value, possibly null. |
ByteBuffer
containing the encoding between position 0 and the current position. Implements io.flutter.plugin.common.MethodCodec.
Definition at line 64 of file JSONMethodCodec.java.
|
inlinepackage |
Definition at line 119 of file JSONMethodCodec.java.
|
static |
Definition at line 26 of file JSONMethodCodec.java.