API reference
API reference
Select your platform
No SDKs available
No versions available

WitChunkConverter Class

A static class used to encode and decode wit data chunks consisting of json mixed with binary data.

Overview

Public Member Functions

Decode
( byte [] rawData,
int start,
int length )
Decodes an array of chunk data

Static Public Member Functions

static string
GetHeaderLog
( byte [] bytes )
Returns a log string for a byte[] by returning the individual bytes for each section. Determines specific settings before returning the log.
static string
GetHeaderLog
( byte [] bytes,
long jsonLength,
long binaryLength,
bool invalid )
Returns a log string for a byte[] by returning the individual bytes for each section.
static string
GetByteString
( byte [] bytes,
int start,
int length,
bool reverse )
Returns a string of all bytes within an array
static string
GetBitString
( byte [] bytes,
int start,
int length,
bool reverse )
Returns a string of the individual bits within a byte array
static string
DecodeString
( byte [] rawData,
int offset,
int length )
Method for decoding raw data into a string
static byte []
Encode
( WitChunk chunkData )
Encodes a json byte[] and raw binary data into a single stream
static byte []
Encode
( byte [] binaryData )
Encodes a binary data into a wit stream
static byte []
Encode
( WitResponseNode jsonToken,
byte [] binaryData )
Encodes a json token and raw binary data into a single stream
static byte []
Encode
( string jsonString,
byte [] binaryData )
Encodes a json string and raw binary data into a single stream
static byte []
Encode
( byte [] jsonData,
byte [] binaryData )
Encodes a json byte[] and raw binary data into a single stream
static byte []
EncodeString
( string stringData )
Method for encoding a string into raw data

Details

Member Functions

WitChunk [] Meta.Voice.Net.Encoding.Wit.WitChunkConverter.Decode
( byte [] rawData,
int start,
int length )
Decodes an array of chunk data
Parameters
rawData
A chunk of bytes to be split into json data and binary data
start
The chunk array start index used for decoding
length
The total number of bytes to be used within chunkData

Static Member Functions

static string Meta.Voice.Net.Encoding.Wit.WitChunkConverter.GetHeaderLog
( byte [] bytes )
Returns a log string for a byte[] by returning the individual bytes for each section. Determines specific settings before returning the log.
static string Meta.Voice.Net.Encoding.Wit.WitChunkConverter.GetHeaderLog
( byte [] bytes,
long jsonLength,
long binaryLength,
bool invalid )
Returns a log string for a byte[] by returning the individual bytes for each section.
static string Meta.Voice.Net.Encoding.Wit.WitChunkConverter.GetByteString
( byte [] bytes,
int start,
int length,
bool reverse )
Returns a string of all bytes within an array
static string Meta.Voice.Net.Encoding.Wit.WitChunkConverter.GetBitString
( byte [] bytes,
int start,
int length,
bool reverse )
Returns a string of the individual bits within a byte array
static string Meta.Voice.Net.Encoding.Wit.WitChunkConverter.DecodeString
( byte [] rawData,
int offset,
int length )
Method for decoding raw data into a string
static byte [] Meta.Voice.Net.Encoding.Wit.WitChunkConverter.Encode
( WitChunk chunkData )
Encodes a json byte[] and raw binary data into a single stream
static byte [] Meta.Voice.Net.Encoding.Wit.WitChunkConverter.Encode
( byte [] binaryData )
Encodes a binary data into a wit stream
static byte [] Meta.Voice.Net.Encoding.Wit.WitChunkConverter.Encode
( WitResponseNode jsonToken,
byte [] binaryData )
Encodes a json token and raw binary data into a single stream
static byte [] Meta.Voice.Net.Encoding.Wit.WitChunkConverter.Encode
( string jsonString,
byte [] binaryData )
Encodes a json string and raw binary data into a single stream
static byte [] Meta.Voice.Net.Encoding.Wit.WitChunkConverter.Encode
( byte [] jsonData,
byte [] binaryData )
Encodes a json byte[] and raw binary data into a single stream
static byte [] Meta.Voice.Net.Encoding.Wit.WitChunkConverter.EncodeString
( string stringData )
Method for encoding a string into raw data
Did you find this page helpful?
Thumbs up icon
Thumbs down icon