Show / Hide Table of Contents

# Class BaseDataStreamMarshaller

A base class with useful implementation inheritence methods for creating marshallers of the OpenWire protocol

##### Inheritance

System.Object
BaseDataStreamMarshaller
DataStructureSupportMarshaller

##### Inherited Members

System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()

###### Namespace: Apache.NMS.ActiveMQ.OpenWire

###### Assembly: Apache.NMS.ActiveMQ.dll

##### Syntax

    public abstract class BaseDataStreamMarshaller

### Methods

| Improve this Doc View Source

#### CreateObject()

##### Declaration

    public abstract DataStructure CreateObject()

##### Returns

Type | Description
--- | ---
DataStructure |

| Improve this Doc View Source

#### GetDataStructureType()

##### Declaration

    public abstract byte GetDataStructureType()

##### Returns

Type | Description
--- | ---
System.Byte |

| Improve this Doc View Source

#### LooseMarshal(OpenWireFormat, Object, BinaryWriter)

##### Declaration

    public virtual void LooseMarshal(OpenWireFormat wireFormat, object o, BinaryWriter dataOut)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
System.Object | o |
System.IO.BinaryWriter | dataOut |

| Improve this Doc View Source

#### LooseMarshalBrokerError(OpenWireFormat, BrokerError, BinaryWriter)

##### Declaration

    protected void LooseMarshalBrokerError(OpenWireFormat wireFormat, BrokerError o, BinaryWriter dataOut)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
BrokerError | o |
System.IO.BinaryWriter | dataOut |

| Improve this Doc View Source

#### LooseMarshalCachedObject(OpenWireFormat, DataStructure, BinaryWriter)

##### Declaration

    protected virtual void LooseMarshalCachedObject(OpenWireFormat wireFormat, DataStructure o, BinaryWriter dataOut)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
DataStructure | o |
System.IO.BinaryWriter | dataOut |

| Improve this Doc View Source

#### LooseMarshalLong(OpenWireFormat, Int64, BinaryWriter)

##### Declaration

    public virtual void LooseMarshalLong(OpenWireFormat wireFormat, long o, BinaryWriter dataOut)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
System.Int64 | o |
System.IO.BinaryWriter | dataOut |

| Improve this Doc View Source

#### LooseMarshalNestedObject(OpenWireFormat, DataStructure, BinaryWriter)

##### Declaration

    protected virtual void LooseMarshalNestedObject(OpenWireFormat wireFormat, DataStructure o, BinaryWriter dataOut)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
DataStructure | o |
System.IO.BinaryWriter | dataOut |

| Improve this Doc View Source

#### LooseMarshalObjectArray(OpenWireFormat, DataStructure[], BinaryWriter)

##### Declaration

    protected virtual void LooseMarshalObjectArray(OpenWireFormat wireFormat, DataStructure[] objects, BinaryWriter dataOut)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
DataStructure[] | objects |
System.IO.BinaryWriter | dataOut |

| Improve this Doc View Source

#### LooseMarshalString(String, BinaryWriter)

##### Declaration

    public static void LooseMarshalString(string value, BinaryWriter dataOut)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | value |
System.IO.BinaryWriter | dataOut |

| Improve this Doc View Source

#### LooseUnmarshal(OpenWireFormat, Object, BinaryReader)

##### Declaration

    public virtual void LooseUnmarshal(OpenWireFormat wireFormat, object o, BinaryReader dataIn)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
System.Object | o |
System.IO.BinaryReader | dataIn |

| Improve this Doc View Source

#### LooseUnmarshalBrokerError(OpenWireFormat, BinaryReader)

##### Declaration

    protected virtual BrokerError LooseUnmarshalBrokerError(OpenWireFormat wireFormat, BinaryReader dataIn)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
System.IO.BinaryReader | dataIn |

##### Returns

Type | Description
--- | ---
BrokerError |

| Improve this Doc View Source

#### LooseUnmarshalCachedObject(OpenWireFormat, BinaryReader)

##### Declaration

    protected virtual DataStructure LooseUnmarshalCachedObject(OpenWireFormat wireFormat, BinaryReader dataIn)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
System.IO.BinaryReader | dataIn |

##### Returns

Type | Description
--- | ---
DataStructure |

| Improve this Doc View Source

#### LooseUnmarshalLong(OpenWireFormat, BinaryReader)

##### Declaration

    public virtual long LooseUnmarshalLong(OpenWireFormat wireFormat, BinaryReader dataIn)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
System.IO.BinaryReader | dataIn |

##### Returns

Type | Description
--- | ---
System.Int64 |

| Improve this Doc View Source

#### LooseUnmarshalNestedObject(OpenWireFormat, BinaryReader)

##### Declaration

    protected virtual DataStructure LooseUnmarshalNestedObject(OpenWireFormat wireFormat, BinaryReader dataIn)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
System.IO.BinaryReader | dataIn |

##### Returns

Type | Description
--- | ---
DataStructure |

| Improve this Doc View Source

#### LooseUnmarshalString(BinaryReader)

##### Declaration

    protected virtual string LooseUnmarshalString(BinaryReader dataIn)

##### Parameters

Type | Name | Description
--- | --- | ---
System.IO.BinaryReader | dataIn |

##### Returns

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### ReadAsciiString(BinaryReader)

##### Declaration

    protected virtual string ReadAsciiString(BinaryReader dataIn)

##### Parameters

Type | Name | Description
--- | --- | ---
System.IO.BinaryReader | dataIn |

##### Returns

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### ReadBytes(BinaryReader)

##### Declaration

    protected virtual byte[] ReadBytes(BinaryReader dataIn)

##### Parameters

Type | Name | Description
--- | --- | ---
System.IO.BinaryReader | dataIn |

##### Returns

Type | Description
--- | ---
System.Byte[] |

| Improve this Doc View Source

#### ReadBytes(BinaryReader, Boolean)

##### Declaration

    protected virtual byte[] ReadBytes(BinaryReader dataIn, bool flag)

##### Parameters

Type | Name | Description
--- | --- | ---
System.IO.BinaryReader | dataIn |
System.Boolean | flag |

##### Returns

Type | Description
--- | ---
System.Byte[] |

| Improve this Doc View Source

#### ReadBytes(BinaryReader, Int32)

##### Declaration

    protected virtual byte[] ReadBytes(BinaryReader dataIn, int size)

##### Parameters

Type | Name | Description
--- | --- | ---
System.IO.BinaryReader | dataIn |
System.Int32 | size |

##### Returns

Type | Description
--- | ---
System.Byte[] |

| Improve this Doc View Source

#### TightMarshal1(OpenWireFormat, Object, BooleanStream)

##### Declaration

    public virtual int TightMarshal1(OpenWireFormat wireFormat, object o, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
System.Object | o |
BooleanStream | bs |

##### Returns

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### TightMarshal2(OpenWireFormat, Object, BinaryWriter, BooleanStream)

##### Declaration

    public virtual void TightMarshal2(OpenWireFormat wireFormat, object o, BinaryWriter dataOut, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
System.Object | o |
System.IO.BinaryWriter | dataOut |
BooleanStream | bs |

| Improve this Doc View Source

#### TightMarshalBrokerError1(OpenWireFormat, BrokerError, BooleanStream)

##### Declaration

    protected int TightMarshalBrokerError1(OpenWireFormat wireFormat, BrokerError o, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
BrokerError | o |
BooleanStream | bs |

##### Returns

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### TightMarshalBrokerError2(OpenWireFormat, BrokerError, BinaryWriter, BooleanStream)

##### Declaration

    protected void TightMarshalBrokerError2(OpenWireFormat wireFormat, BrokerError o, BinaryWriter dataOut, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
BrokerError | o |
System.IO.BinaryWriter | dataOut |
BooleanStream | bs |

| Improve this Doc View Source

#### TightMarshalCachedObject1(OpenWireFormat, DataStructure, BooleanStream)

##### Declaration

    protected virtual int TightMarshalCachedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
DataStructure | o |
BooleanStream | bs |

##### Returns

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### TightMarshalCachedObject2(OpenWireFormat, DataStructure, BinaryWriter, BooleanStream)

##### Declaration

    protected virtual void TightMarshalCachedObject2(OpenWireFormat wireFormat, DataStructure o, BinaryWriter dataOut, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
DataStructure | o |
System.IO.BinaryWriter | dataOut |
BooleanStream | bs |

| Improve this Doc View Source

#### TightMarshalLong1(OpenWireFormat, Int64, BooleanStream)

##### Declaration

    public virtual int TightMarshalLong1(OpenWireFormat wireFormat, long o, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
System.Int64 | o |
BooleanStream | bs |

##### Returns

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### TightMarshalLong2(OpenWireFormat, Int64, BinaryWriter, BooleanStream)

##### Declaration

    public virtual void TightMarshalLong2(OpenWireFormat wireFormat, long o, BinaryWriter dataOut, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
System.Int64 | o |
System.IO.BinaryWriter | dataOut |
BooleanStream | bs |

| Improve this Doc View Source

#### TightMarshalNestedObject1(OpenWireFormat, DataStructure, BooleanStream)

##### Declaration

    protected virtual int TightMarshalNestedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
DataStructure | o |
BooleanStream | bs |

##### Returns

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### TightMarshalNestedObject2(OpenWireFormat, DataStructure, BinaryWriter, BooleanStream)

##### Declaration

    protected virtual void TightMarshalNestedObject2(OpenWireFormat wireFormat, DataStructure o, BinaryWriter dataOut, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
DataStructure | o |
System.IO.BinaryWriter | dataOut |
BooleanStream | bs |

| Improve this Doc View Source

#### TightMarshalObjectArray1(OpenWireFormat, DataStructure[], BooleanStream)

##### Declaration

    protected virtual int TightMarshalObjectArray1(OpenWireFormat wireFormat, DataStructure[] objects, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
DataStructure[] | objects |
BooleanStream | bs |

##### Returns

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### TightMarshalObjectArray2(OpenWireFormat, DataStructure[], BinaryWriter, BooleanStream)

##### Declaration

    protected virtual void TightMarshalObjectArray2(OpenWireFormat wireFormat, DataStructure[] objects, BinaryWriter dataOut, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
DataStructure[] | objects |
System.IO.BinaryWriter | dataOut |
BooleanStream | bs |

| Improve this Doc View Source

#### TightMarshalString1(String, BooleanStream)

##### Declaration

    protected virtual int TightMarshalString1(string value, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | value |
BooleanStream | bs |

##### Returns

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### TightMarshalString2(String, BinaryWriter, BooleanStream)

##### Declaration

    public static void TightMarshalString2(string value, BinaryWriter dataOut, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | value |
System.IO.BinaryWriter | dataOut |
BooleanStream | bs |

| Improve this Doc View Source

#### TightUnmarshal(OpenWireFormat, Object, BinaryReader, BooleanStream)

##### Declaration

    public virtual void TightUnmarshal(OpenWireFormat wireFormat, object o, BinaryReader dataIn, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
System.Object | o |
System.IO.BinaryReader | dataIn |
BooleanStream | bs |

| Improve this Doc View Source

#### TightUnmarshalBrokerError(OpenWireFormat, BinaryReader, BooleanStream)

##### Declaration

    protected virtual BrokerError TightUnmarshalBrokerError(OpenWireFormat wireFormat, BinaryReader dataIn, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
System.IO.BinaryReader | dataIn |
BooleanStream | bs |

##### Returns

Type | Description
--- | ---
BrokerError |

| Improve this Doc View Source

#### TightUnmarshalCachedObject(OpenWireFormat, BinaryReader, BooleanStream)

##### Declaration

    protected virtual DataStructure TightUnmarshalCachedObject(OpenWireFormat wireFormat, BinaryReader dataIn, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
System.IO.BinaryReader | dataIn |
BooleanStream | bs |

##### Returns

Type | Description
--- | ---
DataStructure |

| Improve this Doc View Source

#### TightUnmarshalLong(OpenWireFormat, BinaryReader, BooleanStream)

##### Declaration

    public virtual long TightUnmarshalLong(OpenWireFormat wireFormat, BinaryReader dataIn, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
System.IO.BinaryReader | dataIn |
BooleanStream | bs |

##### Returns

Type | Description
--- | ---
System.Int64 |

| Improve this Doc View Source

#### TightUnmarshalNestedObject(OpenWireFormat, BinaryReader, BooleanStream)

##### Declaration

    protected virtual DataStructure TightUnmarshalNestedObject(OpenWireFormat wireFormat, BinaryReader dataIn, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
OpenWireFormat | wireFormat |
System.IO.BinaryReader | dataIn |
BooleanStream | bs |

##### Returns

Type | Description
--- | ---
DataStructure |

| Improve this Doc View Source

#### TightUnmarshalString(BinaryReader, BooleanStream)

##### Declaration

    protected virtual string TightUnmarshalString(BinaryReader dataIn, BooleanStream bs)

##### Parameters

Type | Name | Description
--- | --- | ---
System.IO.BinaryReader | dataIn |
BooleanStream | bs |

##### Returns

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### ToHexFromBytes(Byte[])

Creates the byte array into hexidecimal

##### Declaration

    public static string ToHexFromBytes(byte[] data)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Byte[] | data |

##### Returns

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### ToString(MessageId)

Converts the object to a String

##### Declaration

    public static string ToString(MessageId id)

##### Parameters

Type | Name | Description
--- | --- | ---
MessageId | id |

##### Returns

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### ToString(ProducerId)

Converts the object to a String

##### Declaration

    public static string ToString(ProducerId id)

##### Parameters

Type | Name | Description
--- | --- | ---
ProducerId | id |

##### Returns

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### ToString(TransactionId)

Converts the given transaction ID into a String

##### Declaration

    public static string ToString(TransactionId txnId)

##### Parameters

Type | Name | Description
--- | --- | ---
TransactionId | txnId |

##### Returns

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### WriteBytes(Byte[], BinaryWriter)

##### Declaration

    protected virtual void WriteBytes(byte[] command, BinaryWriter dataOut)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Byte[] | command |
System.IO.BinaryWriter | dataOut |