Click or drag to resize

BufferSegment Structure

Represents a pointer into a memory buffer.

Namespace:  Demo3D.IO
Assembly:  Demo3D.IO (in Demo3D.IO.dll) Version: 14.0.0.10531
Syntax
C#
public readonly struct BufferSegment : IEquatable<BufferSegment>, 
	ICloneable

The BufferSegment type exposes the following members.

Constructors
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(BufferSegment)
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 ValueTypeEquals(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 ValueTypeGetHashCode.)
Public methodReadBit
Reads a bit at offset in the buffer.
Public methodReadBoolean
Reads a boolean at offset in the buffer.
Public methodReadByte
Reads a byte at offset in the buffer.
Public methodReadBytes(Int32, ArraySegmentByte)
Reads a number of bytes at offset in the buffer.
Public methodReadBytes(Int32, Int32)
Reads a number of bytes at offset in the buffer.
Public methodReadBytes(Int32, IDataWriter, Int32)
Reads a number of bytes at offset in the buffer.
Public methodReadBytes(Int32, Byte, Int32, Int32)
Reads a number of bytes at offset in the buffer.
Public methodReadChar
Reads a character at offset in the buffer.
Public methodReadDouble
Reads a 64bit double floating point number at offset in the buffer.
Public methodReadDoubleBE
Reads a 64bit double floating point number at offset in the buffer.
Public methodReadDoubleLE
Reads a 64bit double floating point number at offset in the buffer.
Public methodReadInt16
Reads a 16bit signed integer at offset in the buffer.
Public methodReadInt16BE
Reads a 16bit signed integer at offset in the buffer.
Public methodReadInt16LE
Reads a 16bit signed integer at offset in the buffer.
Public methodReadInt32
Reads a 32bit signed integer at offset in the buffer.
Public methodReadInt32BE
Reads a 32bit signed integer at offset in the buffer.
Public methodReadInt32LE
Reads a 32bit signed integer at offset in the buffer.
Public methodReadInt64
Reads a 64bit signed integer at offset in the buffer.
Public methodReadInt64BE
Reads a 64bit signed integer at offset in the buffer.
Public methodReadInt64LE
Reads a 64bit signed integer at offset in the buffer.
Public methodReadSByte
Reads a signed byte at offset in the buffer.
Public methodReadSingle
Reads a 32bit single floating point number at offset in the buffer.
Public methodReadSingleBE
Reads a 32bit single floating point number at offset in the buffer.
Public methodReadSingleLE
Reads a 32bit single floating point number at offset in the buffer.
Public methodReadString
Reads a string at offset in the buffer.
Public methodReadUInt16
Reads a 16bit unsigned integer at offset in the buffer.
Public methodReadUInt16BE
Reads a 16bit unsigned integer at offset in the buffer.
Public methodReadUInt16LE
Reads a 16bit unsigned integer at offset in the buffer.
Public methodReadUInt32
Reads a 32bit unsigned integer at offset in the buffer.
Public methodReadUInt32BE
Reads a 32bit unsigned integer at offset in the buffer.
Public methodReadUInt32LE
Reads a 32bit unsigned integer at offset in the buffer.
Public methodReadUInt64
Reads a 64bit unsigned integer at offset in the buffer.
Public methodReadUInt64BE
Reads a 64bit unsigned integer at offset in the buffer.
Public methodReadUInt64LE
Reads a 64bit unsigned integer at offset in the buffer.
Public methodToByteArray
Returns a byte array containing the data referenced by this BufferSegment. The byte array returned may or may not reference the same memory byte array as this BufferSegment.
Public methodToString
Returns a description of the buffer.
(Overrides ValueTypeToString.)
Public methodWriteBit
Writes a bit at offset in the buffer.
Public methodWriteBoolean
Writes a boolean at offset in the buffer.
Public methodWriteByte
Writes a byte at offset in the buffer.
Public methodWriteBytes(Int32, ArraySegmentByte)
Writes a bytes at offset in the data.
Public methodWriteBytes(Int32, Byte)
Writes a bytes at offset in the data.
Public methodWriteBytes(Int32, ArraySegmentByte, Int32)
Writes a bytes at offset in the data.
Public methodWriteBytes(Int32, Byte, Int32, Int32)
Writes a bytes at offset in the data.
Public methodWriteChar
Writes an 8bit character at offset in the buffer.
Public methodWriteDouble
Writes a double floating point number at offset in the buffer.
Public methodWriteDoubleBE
Writes a double floating point number at offset in the buffer.
Public methodWriteDoubleLE
Writes a double floating point number at offset in the buffer.
Public methodWriteInt16
Writes a 16bit signed integer at offset in the buffer.
Public methodWriteInt16BE
Writes a 16bit signed integer at offset in the buffer.
Public methodWriteInt16LE
Writes a 16bit signed integer at offset in the buffer.
Public methodWriteInt32
Writes a 32bit signed integer at offset in the buffer.
Public methodWriteInt32BE
Writes a 32bit signed integer at offset in the buffer.
Public methodWriteInt32LE
Writes a 32bit signed integer at offset in the buffer.
Public methodWriteInt64
Writes a 64bit signed integer at offset in the buffer.
Public methodWriteInt64BE
Writes a 64bit signed integer at offset in the buffer.
Public methodWriteInt64LE
Writes a 64bit signed integer at offset in the buffer.
Public methodWriteSByte
Writes a signed byte at offset in the buffer.
Public methodWriteSingle
Writes a single floating point number at offset in the buffer.
Public methodWriteSingleBE
Writes a single floating point number at offset in the buffer.
Public methodWriteSingleLE
Writes a single floating point number at offset in the buffer.
Public methodWriteString
Writes a string at offset in the buffer.
Public methodWriteUInt16
Writes a 16bit unsigned integer at offset in the buffer.
Public methodWriteUInt16BE
Writes a 16bit unsigned integer at offset in the buffer.
Public methodWriteUInt16LE
Writes a 16bit unsigned integer at offset in the buffer.
Public methodWriteUInt32
Writes a 32bit unsigned integer at offset in the buffer.
Public methodWriteUInt32BE
Writes a 32bit unsigned integer at offset in the buffer.
Public methodWriteUInt32LE
Writes a 32bit unsigned integer at offset in the buffer.
Public methodWriteUInt64
Writes a 64bit unsigned integer at offset in the buffer.
Public methodWriteUInt64BE
Writes a 64bit unsigned integer at offset in the buffer.
Public methodWriteUInt64LE
Writes a 64bit unsigned integer at offset in the buffer.
Top
Operators
See Also