SelfDescribeEncoder class

Inheritance
  • Object
  • Encoder
  • SelfDescribeEncoder

Constructors

SelfDescribeEncoder(Output _out)
SelfDescribeEncoder.noHead(Output _out)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addBuilderOutput(Uint8Buffer buffer) → void
Add the output of a builder to the encoding stream.
inherited
addEncoder<T>(ExtraEncoder encoder) → void
clear() → void
Clears the output buffer.
inherited
getEncoderFor<T>(dynamic value) ExtraEncoder?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
nullBuilderHook(bool validAsMapKey, dynamic keyValue) → void
inherited
removeEncoder<T>(String encoderName) → void
serialize(dynamic val) → void
serializeData(dynamic data) → void
serializeIterable(Iterable data) → void
serializeMap(Map map) → void
startIndefinite(int majorType) → void
Indefinite item start.
inherited
strToByteString(String str) → Uint8Buffer
String to byte string helper.
inherited
toString() String
A string representation of this object.
inherited
writeArray(List value, [bool indefinite = false, int? length]) bool
Array primitive. Valid elements are string, integer, bool, float(any size), array or map. Returns true if the encoding has been successful. If you supply a length this will be used and not calculated from the array size, unless you are encoding certain indefinite sequences you do not need to do this.
inherited
writeArrayImpl(List value, [bool indefinite = false, int? length]) bool
Array write implementation method. If the array cannot be fully encoded no encoding occurs, ie false is returned.
inherited
writeBase16(Uint8Buffer data) → void
Tag based Base16 byte string encoding. The encoder does not itself perform the base encoding as stated in RFC7049, it just indicates to the decoder that the following byte string maybe base encoded.
inherited
writeBase64(Uint8Buffer data) → void
Tag based Base64 byte string encoding. The encoder does not itself perform the base encoding as stated in RFC7049, it just indicates to the decoder that the following byte string maybe base encoded.
inherited
writeBase64URL(Uint8Buffer data) → void
Tag based Base64 URL byte string encoding. The encoder does not itself perform the base encoding as stated in RFC7049, it just indicates to the decoder that the following byte string maybe base encoded.
inherited
writeBignum(BigInt value) → void
inherited
writeBool(bool value) → void
Booleans.
inherited
writeBreak() → void
Indefinite item break primitive.
inherited
writeBuff(Uint8Buffer data, [bool indefinite = false]) → void
Byte string primitive.
inherited
writeBytes(Uint8Buffer data) → void
Primitive byte writer.
inherited
writeCborDi(Uint8Buffer data) → void
Cbor data item encoder, refer to the RFC for details.
inherited
writeDateTime(String dt) → void
Tag based Date/Time encoding. Standard format as described in RFC339 et al.
inherited
writeDouble(double value) → void
Double precision float.
inherited
writeEpoch(num epoch, [encodeFloatAs floatType = encodeFloatAs.single]) → void
Tag based epoch encoding. Format can be a positive or negative integer or a floating point number for which you can chose the encoding.
inherited
writeExtra(dynamic data) bool
writeFloat(double value) → void
Generalised float encoder, picks the smallest encoding it can. If you want a specific precision use the more specialised methods. Note this can lead to encodings you may not expect in corner cases, if you want specific sized encodings don't use this.
inherited
writeHalf(double value) → void
Half precision float.
inherited
writeInt(int value) → void
Positive and negative integers. If the value is too large to be encoded as an integer it is automatically converted to and encoded as a big num
inherited
writeMap(Map value, [bool indefinite = false, int? length]) bool
Map primitive. Valid map keys are integer and string. RFC7049 recommends keys be of a single type, we are more generous here. Valid map values are integer, string, bool, float(any size), array map or buffer. Returns true if the encoding has been successful.
inherited
writeMapImpl(Map value, [bool indefinite = false, int? length]) bool
Map write implementation method. If the map cannot be fully encoded no encoding occurs, ie false is returned.
inherited
writeMimeMessage(String message) → void
Tag based MIME message writer. Note this method does not attempt to validate the MIME message supplied.
inherited
writeNull() → void
Null writer.
inherited
writeRawBuffer(Uint8Buffer buff) → void
Raw byte buffer writer. No encoding is added to the buffer, it goes into the output stream as is.
inherited
writeRegEx(String regex) → void
Tag based Regex writer. Note this method does not attempt to validate the RegEx expression supplied.
inherited
writeSimple(int value) → void
Simple values, negative values, values over 255 or less than 0 will be encoded as an int.
inherited
writeSingle(double value) → void
Single precision float.
inherited
writeSpecial(int special) → void
Special(major type 7) primitive.
inherited
writeString(String str, [bool indefinite = false]) → void
Primitive string writer.
inherited
writeTag(int tag) → void
Tag primitive.
inherited
writeTypeValue(int majorType, int value) → void
writeUndefined() → void
Undefined writer.
inherited
writeURI(String uri) → void
Tag based URI writer
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited