Show / Hide Table of Contents

Class BinarySerializer

BinarySerializer is used to write fields and values to buffers

Inheritance
object
BinarySerializer
Implements
IBytesSink
Namespace: Xrpl.BinaryCodec.Binary
Assembly: Xrpl.BinaryCodec.dll
Syntax
public class BinarySerializer : IBytesSink

Constructors

| Edit this page View Source

BinarySerializer(IBytesSink)

create a value to this BinarySerializer

Declaration
public BinarySerializer(IBytesSink sink)
Parameters
Type Name Description
IBytesSink sink

Bytes Sink

Fields

| Edit this page View Source

_sink

Declaration
public readonly IBytesSink _sink
Field Value
Type Description
IBytesSink

Methods

| Edit this page View Source

Add(BytesList)

Write a value to this BinarySerializer

Declaration
public void Add(BytesList bl)
Parameters
Type Name Description
BytesList bl

value a SerializedType value

| Edit this page View Source

Add(Field, ISerializedType)

Write field and value to BinarySerializer

Declaration
public void Add(Field field, ISerializedType value)
Parameters
Type Name Description
Field field

field field to write to BinarySerializer

ISerializedType value

value value to write to BinarySerializer

| Edit this page View Source

AddFieldHeader(Field)

Write field header to this BinarySerializer

Declaration
public int AddFieldHeader(Field f)
Parameters
Type Name Description
Field f

field

Returns
Type Description
int
Exceptions
Type Condition
InvalidOperationException
| Edit this page View Source

AddLengthEncoded(byte[])

Calculate the header of Variable Length encoded bytes

Declaration
public void AddLengthEncoded(byte[] n)
Parameters
Type Name Description
byte[] n

length the length of the bytes

| Edit this page View Source

AddLengthEncoded(BytesList)

Write a variable length encoded value to the BinarySerializer

Declaration
public void AddLengthEncoded(BytesList bytes)
Parameters
Type Name Description
BytesList bytes

value a SerializedType value

| Edit this page View Source

AddLengthEncoded(ISerializedType)

Write a variable length encoded value to the BinarySerializer

Declaration
public void AddLengthEncoded(ISerializedType value)
Parameters
Type Name Description
ISerializedType value

value length encoded value to write to BytesList

| Edit this page View Source

EncodeVl(int)

Declaration
public static byte[] EncodeVl(int length)
Parameters
Type Name Description
int length
Returns
Type Description
byte[]
| Edit this page View Source

Put(byte)

Write bytes to this BinarySerializer

Declaration
public void Put(byte type)
Parameters
Type Name Description
byte type
| Edit this page View Source

Put(byte[])

Write bytes to this BinarySerializer

Declaration
public void Put(byte[] n)
Parameters
Type Name Description
byte[] n

Implements

IBytesSink
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX