ByteArrayView provides an immutable window (view) onto a byte[] or a part of one, specified with an offset and length. It provides convenience routines to create new windows on the current view.

Namespace: StreamBase.SB
Assembly: StreamBase.SB.Client (in StreamBase.SB.Client.dll) Version: 10.6.0.0

Syntax

         
 C#  Visual Basic  Visual C++ 
public sealed class ByteArrayView : ICloneable
Public NotInheritable Class ByteArrayView _
	Implements ICloneable
public ref class ByteArrayView sealed : ICloneable

Members

         
 All Members  Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
Array
Returns a reference to the backing array for this view. Note that the view might only be of a part of the returned array! This means you should only access the array between Offset and Offset + Length. NB: No data is copied when doing this.
Clone()()()()
Clone this ByteArrayView
CompareTo(ByteArrayView)
Compare this ByteArrayView to another lexigraphically. NB: No data is copied when doing this.
Copy()()()()
Create a new ByteArrayView which wraps a new byte[] containing a copy of this view's data. NB: This method copies the underlying data.
Copy(Int32, Int32)
Create a new ByteArrayView which wraps a new byte[] containing a copy of a portion of this view's data. NB: This method copies the underlying data.
CopyBytes()()()()
Create a new byte[] containing a copy of this view's data. NB: This method copies the underlying data.
CopyBytes(Int32, Int32)
Create a new byte[] containing a copy of a portion of this view's data. NB: This method copies the underlying data.
Equals(Object)
Returns true if this ByteArrayView is equal to the given one.
(Overrides Object..::..Equals(Object).)
GetHashCode()()()()
Hash function for this type.
(Overrides Object..::..GetHashCode()()()().)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
Item[([( Int32])])
Length
Returns the length in bytes of the view.
MakeView(array<Byte>[]()[][])
Create a new ByteArrayView which wraps the entire provided byte[]. NB: no data is copied when doing this
MakeView(array<Byte>[]()[][], Int32, Int32)
Create a new ByteArrayView which wraps the portion of byte[] between offset and len from offset. NB: no data is copied when doing this
Offset
Returns the offset into the backing array at which this view starts.
ToString()()()()
Return a string representation of this ByteArrayView.
(Overrides Object..::..ToString()()()().)
ToString(Int32)
Return a string representation of this ByteArrayView. If the array is longer than maxChars, only maxChars - 3 bytes will be written followed by an ellipsis ('...').

Inheritance Hierarchy

System..::..Object
  StreamBase.SB..::..ByteArrayView

See Also