• Facebook
  • Twitter
  • Youtube
  • LinedIn
  • RSS
  • Docs
  • Comparisons
  • Blogs
  • Download
  • Contact Us
Download
Show / Hide Table of Contents

Class CompactReader

CompactReader is the base class for CompactBinaryReader.

Inheritance
System.Object
CompactReader
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
public abstract class CompactReader

Properties

BaseStream

Memory stream on which the bytes are read from

Declaration
public abstract Stream BaseStream { get; }
Property Value
Type Description
System.IO.Stream

Methods

Read(Byte[], Int32, Int32)

Reads the specifies number of bytes into buffer. This method reads directly from the underlying stream.

Declaration
public abstract int Read(byte[] buffer, int index, int count)
Parameters
Type Name Description
System.Byte[] buffer

buffer to read into

System.Int32 index

starting position in the buffer

System.Int32 count

number of bytes to write

Returns
Type Description
System.Int32

number of buffer read

Read(Char[], Int32, Int32)

Reads the specifies number of bytes into buffer. This method reads directly from the underlying stream.

Declaration
public abstract int Read(char[] buffer, int index, int count)
Parameters
Type Name Description
System.Char[] buffer

buffer to read into

System.Int32 index

starting position in the buffer

System.Int32 count

number of bytes to write

Returns
Type Description
System.Int32

number of chars read

ReadBoolean()

Reads an object of type System.Boolean from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract bool ReadBoolean()
Returns
Type Description
System.Boolean

object read from the stream

ReadBoolean(Boolean)

Reads an object of type System.Boolean from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract bool ReadBoolean(bool defaultValue)
Parameters
Type Name Description
System.Boolean defaultValue

Default value to be used for deserializing old version of the object

Returns
Type Description
System.Boolean

bool read from the stream

ReadByte()

Reads an object of type System.Byte from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract byte ReadByte()
Returns
Type Description
System.Byte

object read from the stream

ReadByte(Byte)

Reads an object of type System.Byte from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract byte ReadByte(byte defaultValue)
Parameters
Type Name Description
System.Byte defaultValue

Default value to be used for deserializing old version of the object

Returns
Type Description
System.Byte

object read from the stream

ReadBytes(Int32)

Reads an object of type from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract byte[] ReadBytes(int count)
Parameters
Type Name Description
System.Int32 count

number of bytes read

Returns
Type Description
System.Byte[]

object read from the stream

ReadBytes(Int32, Byte[])

Reads an object of type from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract byte[] ReadBytes(int count, byte[] defaultValue)
Parameters
Type Name Description
System.Int32 count

number of bytes read

System.Byte[] defaultValue

Default value to be used for deserializing old version of the object

Returns
Type Description
System.Byte[]

object read from the stream

ReadChar()

Reads an object of type System.Char from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract char ReadChar()
Returns
Type Description
System.Char

object read from the stream

ReadChar(Char)

Reads an object of type System.Char from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract char ReadChar(char defaultValue)
Parameters
Type Name Description
System.Char defaultValue

Default value to be used for deserializing old version of the object

Returns
Type Description
System.Char

object read from the stream

ReadChars(Int32)

Reads an object of type from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract char[] ReadChars(int count)
Parameters
Type Name Description
System.Int32 count
Returns
Type Description
System.Char[]

object read from the stream

ReadChars(Int32, Char[])

Reads an object of type from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract char[] ReadChars(int count, char[] defaultValue)
Parameters
Type Name Description
System.Int32 count
System.Char[] defaultValue

Default value to be used for deserializing old version of the object

Returns
Type Description
System.Char[]

object read from the stream

ReadDateTime()

Reads an object of type System.DateTime from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract DateTime ReadDateTime()
Returns
Type Description
System.DateTime

object read from the stream

ReadDateTime(DateTime)

Reads an object of type System.DateTime from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract DateTime ReadDateTime(DateTime defaultValue)
Parameters
Type Name Description
System.DateTime defaultValue

Default value to be used for deserializing old version of the object

Returns
Type Description
System.DateTime

object read from the stream

ReadDecimal()

Reads an object of type System.Decimal from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract decimal ReadDecimal()
Returns
Type Description
System.Decimal

object read from the stream

ReadDecimal(Decimal)

Reads an object of type System.Decimal from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract decimal ReadDecimal(decimal defaultValue)
Parameters
Type Name Description
System.Decimal defaultValue

Default value to be used for deserializing old version of the object

Returns
Type Description
System.Decimal

object read from the stream

ReadDouble()

Reads an object of type System.Double from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract double ReadDouble()
Returns
Type Description
System.Double

object read from the stream

ReadDouble(Double)

Reads an object of type System.Double from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract double ReadDouble(double defaultValue)
Parameters
Type Name Description
System.Double defaultValue

Default value to be used for deserializing old version of the object

Returns
Type Description
System.Double

object read from the stream

ReadGuid()

Reads an object of type System.Guid from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract Guid ReadGuid()
Returns
Type Description
System.Guid

object read from the stream

ReadGuid(Guid)

Reads an object of type System.Guid from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract Guid ReadGuid(Guid defaultValue)
Parameters
Type Name Description
System.Guid defaultValue

Default value to be used for deserializing old version of the object

Returns
Type Description
System.Guid

object read from the stream

ReadInt16()

Reads an object of type System.Int16 from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract short ReadInt16()
Returns
Type Description
System.Int16

object read from the stream

ReadInt16(Int16)

Reads an object of type System.Int16 from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract short ReadInt16(short defaultValue)
Parameters
Type Name Description
System.Int16 defaultValue

Default value to be used for deserializing old version of the object

Returns
Type Description
System.Int16

object read from the stream

ReadInt32()

Reads an object of type System.Int32 from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract int ReadInt32()
Returns
Type Description
System.Int32

object read from the stream

ReadInt32(Int32)

Reads an object of type System.Int32 from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract int ReadInt32(int defaultValue)
Parameters
Type Name Description
System.Int32 defaultValue

Default value to be used for deserializing old version of the object

Returns
Type Description
System.Int32

object read from the stream

ReadInt64()

Reads an object of type System.Int64 from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract long ReadInt64()
Returns
Type Description
System.Int64

object read from the stream

ReadInt64(Int64)

Reads an object of type System.Int64 from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract long ReadInt64(long deafultValue)
Parameters
Type Name Description
System.Int64 deafultValue
Returns
Type Description
System.Int64

object read from the stream

ReadObject()

Reads an object of type System.Object from the current stream and advances the stream position.

Declaration
public abstract object ReadObject()
Returns
Type Description
System.Object

object read from the stream

ReadObject(Object)

Reads an object of type System.Object from the current stream and advances the stream position.

Declaration
public abstract object ReadObject(object defaultValue)
Parameters
Type Name Description
System.Object defaultValue

Default value to be used for deserializing old version of the object

Returns
Type Description
System.Object

object read from the stream

ReadObjectAs<T>()

Reads an object of specified type from the current stream.

Declaration
public abstract T ReadObjectAs<T>()
Returns
Type Description
T
Type Parameters
Name Description
T

ReadSByte()

Reads an object of type System.SByte from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
[CLSCompliant(false)]
public virtual sbyte ReadSByte()
Returns
Type Description
System.SByte

object read from the stream

ReadSByte(SByte)

Reads an object of type System.SByte from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
[CLSCompliant(false)]
public virtual sbyte ReadSByte(sbyte defaultValue)
Parameters
Type Name Description
System.SByte defaultValue

Default value to be used for deserializing old version of the object

Returns
Type Description
System.SByte

object read from the stream

ReadSingle()

Reads an object of type System.Single from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract float ReadSingle()
Returns
Type Description
System.Single

object read from the stream

ReadSingle(Single)

Reads an object of type System.Single from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract float ReadSingle(float defaultValue)
Parameters
Type Name Description
System.Single defaultValue

Default value to be used for deserializing old version of the object

Returns
Type Description
System.Single

object read from the stream

ReadString()

Reads an object of type System.String from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract string ReadString()
Returns
Type Description
System.String

object read from the stream

ReadString(String)

Reads an object of type System.String from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
public abstract string ReadString(string defultValue)
Parameters
Type Name Description
System.String defultValue
Returns
Type Description
System.String

object read from the stream

ReadUInt16()

Reads an object of type System.UInt16 from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
[CLSCompliant(false)]
public virtual ushort ReadUInt16()
Returns
Type Description
System.UInt16

object read from the stream

ReadUInt16(UInt16)

Reads an object of type System.UInt16 from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
[CLSCompliant(false)]
public virtual ushort ReadUInt16(ushort defaultValue)
Parameters
Type Name Description
System.UInt16 defaultValue

Default value to be used for deserializing old version of the object

Returns
Type Description
System.UInt16

object read from the stream

ReadUInt32()

Reads an object of type System.UInt32 from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
[CLSCompliant(false)]
public virtual uint ReadUInt32()
Returns
Type Description
System.UInt32

object read from the stream

ReadUInt32(UInt32)

Reads an object of type System.UInt32 from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
[CLSCompliant(false)]
public virtual uint ReadUInt32(uint defaultValue)
Parameters
Type Name Description
System.UInt32 defaultValue

Default value to be used for deserializing old version of the object

Returns
Type Description
System.UInt32

object read from the stream

ReadUInt64()

Reads an object of type System.UInt64 from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
[CLSCompliant(false)]
public virtual ulong ReadUInt64()
Returns
Type Description
System.UInt64

object read from the stream

ReadUInt64(UInt64)

Reads an object of type System.UInt64 from the current stream and advances the stream position. This method reads directly from the underlying stream.

Declaration
[CLSCompliant(false)]
public virtual ulong ReadUInt64(ulong defaultValue)
Parameters
Type Name Description
System.UInt64 defaultValue

Default value to be used for deserializing old version of the object

Returns
Type Description
System.UInt64

object read from the stream

SkipBoolean()

Skips an object of type System.Boolean from the current stream and advances the stream position. This method Skips directly from the underlying stream.

Declaration
public abstract void SkipBoolean()

SkipByte()

Skips an object of type System.Byte from the current stream and advances the stream position. This method Skips directly from the underlying stream.

Declaration
public abstract void SkipByte()

SkipBytes(Int32)

Skips an object of type from the current stream and advances the stream position. This method Skips directly from the underlying stream.

Declaration
public abstract void SkipBytes(int count)
Parameters
Type Name Description
System.Int32 count

number of bytes read

SkipChar()

Skips an object of type System.Char from the current stream and advances the stream position. This method Skips directly from the underlying stream.

Declaration
public abstract void SkipChar()

SkipChars(Int32)

Skips an object of type from the current stream and advances the stream position. This method Skips directly from the underlying stream.

Declaration
public abstract void SkipChars(int count)
Parameters
Type Name Description
System.Int32 count

SkipDateTime()

Skips an object of type System.DateTime from the current stream and advances the stream position. This method Skips directly from the underlying stream.

Declaration
public abstract void SkipDateTime()

SkipDecimal()

Skips an object of type System.Decimal from the current stream and advances the stream position. This method Skips directly from the underlying stream.

Declaration
public abstract void SkipDecimal()

SkipDouble()

Skips an object of type System.Double from the current stream and advances the stream position. This method Skips directly from the underlying stream.

Declaration
public abstract void SkipDouble()

SkipGuid()

Skips an object of type System.Guid from the current stream and advances the stream position. This method Skips directly from the underlying stream.

Declaration
public abstract void SkipGuid()

SkipInt16()

Skips an object of type System.Int16 from the current stream and advances the stream position. This method Skips directly from the underlying stream.

Declaration
public abstract void SkipInt16()

SkipInt32()

Skips an object of type System.Int32 from the current stream and advances the stream position. This method Skips directly from the underlying stream.

Declaration
public abstract void SkipInt32()

SkipInt64()

Skips an object of type System.Int64 from the current stream and advances the stream position. This method Skips directly from the underlying stream.

Declaration
public abstract void SkipInt64()

SkipObject()

Skips an object of type System.Object from the current stream and advances the stream position.

Declaration
public abstract void SkipObject()

SkipObjectAs<T>()

Skips an object of template type from the current stream and advances the stream position.

Declaration
public abstract void SkipObjectAs<T>()
Type Parameters
Name Description
T

SkipSByte()

Skips an object of type System.SByte from the current stream and advances the stream position. This method Skips directly from the underlying stream.

Declaration
[CLSCompliant(false)]
public virtual void SkipSByte()

SkipSingle()

Skips an object of type System.Single from the current stream and advances the stream position. This method Skips directly from the underlying stream.

Declaration
public abstract void SkipSingle()

SkipString()

Skips an object of type System.String from the current stream and advances the stream position. This method Skips directly from the underlying stream.

Declaration
public abstract void SkipString()

SkipUInt16()

Skips an object of type System.UInt16 from the current stream and advances the stream position. This method Skips directly from the underlying stream.

Declaration
[CLSCompliant(false)]
public virtual void SkipUInt16()

SkipUInt32()

Skips an object of type System.UInt32 from the current stream and advances the stream position. This method Skips directly from the underlying stream.

Declaration
[CLSCompliant(false)]
public virtual void SkipUInt32()

SkipUInt64()

Skips an object of type System.UInt64 from the current stream and advances the stream position. This method Skips directly from the underlying stream.

Declaration
[CLSCompliant(false)]
public virtual void SkipUInt64()

Contact Us

PHONE

+1 (214) 764-6933   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • NCache Enterprise
  • NCache Community
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top