Class BinaryParser
BinaryParser is used to compute fields and values from a HexString
Namespace: Xrpl.BinaryCodec.Binary
Assembly: Xrpl.BinaryCodec.dll
Syntax
public abstract class BinaryParser : object
Fields
| Improve this Doc View SourceCursor
cursor position
Declaration
protected int Cursor
Field Value
Type | Description |
---|---|
System.Int32 |
Size
Parser size
Declaration
protected int Size
Field Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceEnd()
END of parser
Declaration
public bool End()
Returns
Type | Description |
---|---|
System.Boolean | bool result |
End(Nullable<Int32>)
END of parser
Declaration
public bool End(int? customEnd)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Int32> | customEnd | current cursor position |
Returns
Type | Description |
---|---|
System.Boolean | bool result |
Peek()
Consume the first n bytes of the BinaryParser
Declaration
public abstract byte Peek()
Returns
Type | Description |
---|---|
System.Byte |
Pos()
Cursor position
Declaration
public int Pos()
Returns
Type | Description |
---|---|
System.Int32 | Cursor position |
Read(Int32)
read the first n bytes from the BinaryParser
Declaration
public abstract byte[] Read(int n)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | n | The number of bytes to read |
Returns
Type | Description |
---|---|
System.Byte[] | The bytes |
ReadField()
Read the field from the BinaryParser
Declaration
public Field ReadField()
Returns
Type | Description |
---|---|
Field | The field represented by the bytes at the head of the BinaryParser |
ReadFieldCode()
Reads the field ordinal from the BinaryParser
Declaration
public int ReadFieldCode()
Returns
Type | Description |
---|---|
System.Int32 | Field ordinal |
ReadOne()
read the byte from the BinaryParser by current cursor position
Declaration
public abstract byte ReadOne()
Returns
Type | Description |
---|---|
System.Byte |
ReadOneInt()
Read an integer of given size
Declaration
public int ReadOneInt()
Returns
Type | Description |
---|---|
System.Int32 |
ReadVlLength()
Reads variable length encoded bytes
Declaration
public int ReadVlLength()
Returns
Type | Description |
---|---|
System.Int32 | The variable length bytes |
Skip(Int32)
todo
Declaration
public abstract void Skip(int n)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | n | n the number of bytes to skip |