Click or drag to resize

Buffer Class

Represents a pointer into a memory buffer.
Inheritance Hierarchy
SystemObject
  Demo3D.IOBuffer

Namespace: Demo3D.IO
Assembly: Demo3D.IO (in Demo3D.IO.dll) Version: 19.00.00
Syntax
C#
public sealed class Buffer : IOffsetDataReader, 
	IDataReferenceReader, IOffsetDataWriter, IBufferResolver, IDataReferenceWriter, IDataReference, 
	IEquatable<Buffer>, ICloneable

The Buffer type exposes the following members.

Constructors
 NameDescription
Public methodBuffer(ArraySegmentByte) Creates a new Buffer referencing a subsection of the same underlying memory byte array as the specified pointer.
Public methodBuffer(Byte) Creates a new Buffer describing the entire specified byte array.
Public methodBuffer(Int64) Creates a new Buffer with a given fixed size.
Public methodBuffer(ArraySegmentByte, Int32, Int32) Creates a new Buffer referencing a subsection of the same underlying memory byte array as the specified pointer.
Public methodBuffer(Byte, Int32, Int32) Creates a new Buffer.
Top
Properties
 NameDescription
Public propertyData The underlying memory byte array.
Public propertyStatic memberEmpty An empty buffer.
Public propertyFrom Index into Data of the first byte in the BufferSegment.
Public propertyItem Indexer
Public propertyLength The number of bytes being referenced by this BufferSegment.
Public propertyTo Returns the index into Data of the first byte after the BufferSegment.
Top
Methods
 NameDescription
Public methodClone Return a copy of the data. The underlying buffer is not shared.
Public methodEquals(Buffer) Returns true if the two buffers have the same content.
Public methodEquals(Byte) Returns true if the two buffers have the same content.
Public methodEquals(Object) Returns true if the two buffers have the same content.
(Overrides ObjectEquals(Object))
Public methodEquals(Byte, Int32, Int32) Returns true if length portion of the two buffers have the same content.
Public methodEquals(Int32, Byte, Int32, Int32) Returns true if length portion of the two buffers have the same content.
Public methodStatic memberEquals(Byte, Int32, Byte, Int32, Int32) Returns true if length portion of the two buffers have the same content.
Public methodGetHashCode Serves has a hash function for the content of the buffer.
(Overrides ObjectGetHashCode)
Public methodGetReferenceT Returns a reference to data of type T at offset in the buffer.
Public methodToByteArray Returns a byte array containing the data referenced by this Buffer. The byte array returned may or may not reference the same memory byte array as this Buffer.
Public methodToString Returns a description of the buffer.
(Overrides ObjectToString)
Top
Operators
 NameDescription
Public operatorStatic member(BufferSegment to Buffer) Convert BufferSegment to Buffer.
Public operatorStatic member(Buffer to BufferSegment) Convert Buffer to BufferSegment.
Public operatorStatic member(Buffer to ArraySegmentByte) Convert Buffer to ArraySegment{byte}.
Top
Extension Methods
 NameDescription
Public Extension MethodReadBit Reads a bit at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadBoolean Reads a boolean at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadByte Reads from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions)
Public Extension MethodReadBytes Reads a number of bytes at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadBytes Reads a number of bytes at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadBytes Reads a number of bytes at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadBytes Reads a number of bytes at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadChar Reads a character at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadDouble Reads a 64bit double floating point number at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadDoubleBE Reads a 64bit double floating point number at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadDoubleLE Reads from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions)
Public Extension MethodReadInt16 Reads a 16bit signed integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadInt16BE Reads a 16bit signed integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadInt16LE Reads from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions)
Public Extension MethodReadInt32 Reads a 32bit signed integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadInt32BE Reads a 32bit signed integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadInt32LE Reads the memory exchange from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions)
Public Extension MethodReadInt64 Reads a 64bit signed integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadInt64BE Reads a 64bit signed integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadInt64LE Reads from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions)
Public Extension MethodReadSByte Reads from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions)
Public Extension MethodReadSingle Reads a 32bit single floating point number at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadSingleBE Reads a 32bit single floating point number at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadSingleLE Reads from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions)
Public Extension MethodReadString Reads a string at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadUInt16 Reads a 16bit unsigned integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadUInt16BE Reads a 16bit unsigned integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadUInt16LE Reads from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions)
Public Extension MethodReadUInt32 Reads a 32bit unsigned integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadUInt32BE Reads a 32bit unsigned integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadUInt32LE Reads from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions)
Public Extension MethodReadUInt64 Reads a 64bit unsigned integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadUInt64BE Reads a 64bit unsigned integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions)
Public Extension MethodReadUInt64LE Reads from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions)
Public Extension MethodWriteAsBit Writes a bit at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.Boolean). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 1 byte.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsBoolean Writes a boolean at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.Boolean). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 1 byte.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsByte Writes a byte at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.Byte). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 1 byte.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsChar Writes a character at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.Char). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 1 byte.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsDouble Writes a 64bit double floating point number at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.Double). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 8 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsDoubleBE Writes a 64bit double floating point number at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.Double). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 8 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsDoubleLE Writes a 64bit double floating point number at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.Double). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 8 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsInt16 Writes a 16bit signed integer at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.Int16). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 2 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsInt16BE Writes a 16bit signed integer at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.Int16). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 2 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsInt16LE Writes a 16bit signed integer at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.Int16). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 2 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsInt32 Writes a 32bit signed integer at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.Int32). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 4 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsInt32BE Writes a 32bit signed integer at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.Int32). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 4 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsInt32LE Writes a 32bit signed integer at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.Int32). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 4 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsInt64 Writes a 64bit signed integer at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.Int64). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 8 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsInt64BE Writes a 64bit signed integer at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.Int64). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 8 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsInt64LE Writes a 64bit signed integer at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.Int64). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 8 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsSByte Writes a signed byte at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.SByte). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 1 byte.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsSingle Writes a 32bit single floating point number at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.Single). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 4 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsSingleBE Writes a 32bit single floating point number at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.Single). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 4 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsSingleLE Writes a 32bit single floating point number at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.Single). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 4 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsString Writes a string at the current position in the buffer. The current position is advanced by the number of bytes written.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsUInt16 Writes a 16bit unsigned integer at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.UInt16). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 2 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsUInt16BE Writes a 16bit unsigned integer at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.UInt16). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 2 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsUInt16LE Writes a 16bit unsigned integer at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.UInt16). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 2 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsUInt32 Writes a 32bit unsigned integer at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.UInt32). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 4 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsUInt32BE Writes a 32bit unsigned integer at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.UInt32). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 4 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsUInt32LE Writes a 32bit unsigned integer at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.UInt32). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 4 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsUInt64 Writes a 64bit unsigned integer at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.UInt64). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 8 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsUInt64BE Writes a 64bit unsigned integer at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.UInt64). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 8 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteAsUInt64LE Writes a 64bit unsigned integer at the current position in the buffer. The object is first converted using BinaryConvert.ChangeType(val, TypeCode.UInt64). ChangeType(Object, Type, BinaryConvertConversionType) The current position is advanced by 8 bytes.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteBit Writes a bit at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteBoolean Writes a boolean at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteByte Write a value at the specified offset.
(Defined by DataReferenceExtensions)
Public Extension MethodWriteBytes Writes a bytes at offset in the data.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteBytes Writes a bytes at offset in the data.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteBytes Writes a bytes at offset in the data.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteBytes Writes a bytes at offset in the data.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteChar Writes an 8bit character at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteDouble Writes a double floating point number at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteDoubleBE Writes a double floating point number at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteDoubleLE Write a value at the specified offset.
(Defined by DataReferenceExtensions)
Public Extension MethodWriteInt16 Writes a 16bit signed integer at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteInt16BE Writes a 16bit signed integer at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteInt16LE Write a value at the specified offset.
(Defined by DataReferenceExtensions)
Public Extension MethodWriteInt32 Writes a 32bit signed integer at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteInt32BE Writes a 32bit signed integer at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteInt32LE Write a value at the specified offset.
(Defined by DataReferenceExtensions)
Public Extension MethodWriteInt64 Writes a 64bit signed integer at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteInt64BE Writes a 64bit signed integer at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteInt64LE Write a value at the specified offset.
(Defined by DataReferenceExtensions)
Public Extension MethodWriteSByte Write a value at the specified offset.
(Defined by DataReferenceExtensions)
Public Extension MethodWriteSingle Writes a single floating point number at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteSingleBE Writes a single floating point number at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteSingleLE Write a value at the specified offset.
(Defined by DataReferenceExtensions)
Public Extension MethodWriteString Writes a string at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteUInt16 Writes a 16bit unsigned integer at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteUInt16BE Writes a 16bit unsigned integer at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteUInt16LE Write a value at the specified offset.
(Defined by DataReferenceExtensions)
Public Extension MethodWriteUInt32 Writes a 32bit unsigned integer at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteUInt32BE Writes a 32bit unsigned integer at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteUInt32LE Write a value at the specified offset.
(Defined by DataReferenceExtensions)
Public Extension MethodWriteUInt64 Writes a 64bit unsigned integer at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteUInt64BE Writes a 64bit unsigned integer at offset in the buffer.
(Defined by OffsetDataWriterExtensions)
Public Extension MethodWriteUInt64LE Write a value at the specified offset.
(Defined by DataReferenceExtensions)
Top
See Also