Movatterモバイル変換


[0]ホーム

URL:


menu
  1. Dart
  2. dart:convert
  3. Codec<S,T> class
Codec
description

Codec<S,T> classabstractmixin

ACodec encodes and (if supported) decodes data.

Codecs can be fused. For example fusingjson andutf8 producesan encoder that can convert Json objects directly to bytes, or can decodebytes directly to json objects.

Fused codecs generally attempt to optimize the operations and can be fasterthan executing each step of an encoding separately.

TheCodec class provides a default implementation ofencode,decode,fuse andinverted.Subclasses can choose to provide more efficient implementations of these.

Implementers

Constructors

Codec()
const

Properties

decoderConverter<T,S>
Returns the decoder ofthis, converting fromT toS.
no setter
encoderConverter<S,T>
Returns the encoder fromS toT.
no setter
hashCodeint
The hash code for this object.
no setterinherited
invertedCodec<T,S>
Invertsthis.
no setter
runtimeTypeType
A representation of the runtime type of the object.
no setterinherited

Methods

decode(Tencoded)→ S
Decodesencoded data.
encode(Sinput)→ T
Encodesinput.
fuse<R>(Codec<T,R>other)Codec<S,R>
Fusesthis withother.
noSuchMethod(Invocationinvocation)→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString()String
A string representation of this object.
inherited

Operators

operator ==(Objectother)bool
The equality operator.
inherited
  1. Dart
  2. dart:convert
  3. Codec<S,T> class
dart:convert library

[8]ページ先頭

©2009-2025 Movatter.jp