hessiancsharp.io.AbstractHessianOutput.WriteByteBufferPart C# (CSharp) Method

WriteByteBufferPart() public abstract method

Writes a part of the byte buffer to the stream b b16 b18 bytes
public abstract WriteByteBufferPart ( byte arrBuffer, int intOffset, int intLength ) : void
arrBuffer byte Array with bytes to write
intOffset int Vslue offset
intLength int Value length
return void
        public abstract void WriteByteBufferPart(byte[] arrBuffer,
			int intOffset,
			int intLength);

Usage Example

        /// <summary>
        /// Serialization of stream valued objects
        /// </summary>
        /// <param name="obj">Object to serialize</param>
        /// <param name="abstractHessianOutput">HessianOutput - Instance</param>
        public override void WriteObject(object obj, AbstractHessianOutput abstractHessianOutput)
        {
            Stream inStream = (Stream) obj;

            if (inStream == null)
                abstractHessianOutput.WriteNull();
            else
            {
                byte[] buf = new byte[1024];
                int len;
                while ((len = inStream.Read(buf, 0, buf.Length)) > 0)
                {
                    abstractHessianOutput.WriteByteBufferPart(buf, 0, len);
                }
                abstractHessianOutput.WriteByteBufferEnd(buf, 0, 0);
            }
        }
All Usage Examples Of hessiancsharp.io.AbstractHessianOutput::WriteByteBufferPart