Bin2DataStreamer

Overview

Bin2DataStreamer implementation compatible with other platforms. Some 64bit data types that hold big values are limited to 48bit due to nature of JavaScript numbers. Shouldn't be created directly by user, just provide streamer class when creating data adapter.

var channel = new RemObjects.SDK.HTTPClientChannel("http://" + window.location.host + "/JSON");
var message = new RemObjects.SDK.JSONMessage();
var service = new RemObjects.SDK.RemoteService(channel, message, "DASampleService");
var loginService = new RemObjects.SDK.RemoteService(channel, message, "LoginService");
var rda = new RemObjects.DataAbstract.RemoteDataAdapter(service, loginService, RemObjects.DataAbstract.Bin2DataStreamer);

Location

DataAbstract.js


Instance Methods


constructor Bin2DataStreamer

Creates streamer object.

function constructor Bin2DataStreamer()

finalizeWrite

Called after writing the data.

function finalizeWrite()

getStream

Returns the data stream that is to be passed to the server.

function getStream()

initializeRead

Called before reading the data.

function initializeRead()

initializeWrite

Called before writing the data.

function initializeWrite()

read

Reads a value from the stream.

function read(aType)

Parameters:

  • aType: string

readAnsiStringWithLength

Reads a string from the stream. Usually used internally.

function readAnsiStringWithLength()

readByte

Reads a byte from the stream. Usually used internally.

function readByte()

readDataset

Populates aDataset with the data read from the stream.

function readDataset(aDataset)

Parameters:


readDelta

Reads Delta from the stream.

function readDelta()

readField

Reads Field from the stream. Used internally when IncludeSchema is set to true.

function readField(aPropCount)

Parameters:

  • aPropCount: number

readInteger

Reads integer value from the stream. Used internally.

function readInteger()

readParam

Reads parameter from the stream. Used internally when IncludeSchema is set to true.

function readParam(aPropCount)

Parameters:

  • aPropCount: number

readUtf8StringWithLength

Used internally.

function readUtf8StringWithLength()

setStream

Assigns data stream to the internal field.

function setStream(aStream)

Parameters:

  • aStream: string containing binary data

write

Writes aValue to the stream.

function write(aType, aValue)

Parameters:

  • aType: string
  • aValue: object

writeAnsiStringWithLength

Writes string to the stream. Used internally.

function writeAnsiStringWithLength(aValue)

Parameters:

  • aValue: string

writeByte

Writes byte to the stream. Used internally.

function writeByte(aValue)

Parameters:

  • aValue: number

writeDelta

function writeDelta(aDeltas, aSendReducedDelta)

Parameters:

  • aDeltas:
  • aSendReducedDelta:

writeInteger

Writes integer to the stream. Used internally.

function writeInteger(aValue)

Parameters:

  • aValue: number