MemoryStream

Overview

Memory stream implementation.

Location

 

constructor    (declared in Object)

Default constructor.

 

constructor

 

MemoryStream()

 

init()

 

MemoryStream()

constructor (Int32)

Creates a memory stream with an initial capacity.

 

constructor(aCapacity: Int32)

 

MemoryStream(Int32 aCapacity)

 

init(_ aCapacity: Int32)

 

MemoryStream(Int32 aCapacity)

Parameters:

  • aCapacity:

CanRead  override virtual

Should return true if this stream can be read from.

 

property CanRead: Boolean read;

 

Boolean CanRead { get; }

 

var CanRead: Boolean { get{} }

 

Boolean CanRead { __get; }

CanSeek  override virtual

Should return true if this stream can be seeked.

 

property CanSeek: Boolean read;

 

Boolean CanSeek { get; }

 

var CanSeek: Boolean { get{} }

 

Boolean CanSeek { __get; }

CanWrite  override virtual

Should return true if this stream can be written to.

 

property CanWrite: Boolean read;

 

Boolean CanWrite { get; }

 

var CanWrite: Boolean { get{} }

 

Boolean CanWrite { __get; }

Capacity

 

property Capacity: Int32 read write;

 

Int32 Capacity { get; set; }

 

var Capacity: Int32 { get{} set{} }

 

Int32 Capacity { __get; __set; }

Close  virtual    (declared in Stream)

Close this stream.

 

method Close

 

void Close()

 

func Close()

 

void Close()

CopyTo    (declared in Stream)

Copy the stream to another stream.

 

method CopyTo(Destination: Stream)

 

void CopyTo(Stream Destination)

 

func CopyTo(_ Destination: Stream)

 

void CopyTo(Stream Destination)

Parameters:

  • Destination:

Equals  virtual    (declared in Object)

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

Parameters:

  • obj: the reference to compare this with.

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

Flush  virtual    (declared in Stream)

Flush this stream (or do nothing if not applicable).

 

method Flush

 

void Flush()

 

func Flush()

 

void Flush()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

IsValid  protected override virtual

Returns true if this stream is still valid.

 

method IsValid: Boolean

 

Boolean IsValid()

 

func IsValid() -> Boolean

 

Boolean IsValid()

Length  override virtual

Length of this stream.

 

property Length: Int64 read;

 

Int64 Length { get; }

 

var Length: Int64 { get{} }

 

Int64 Length { __get; }

LoadFromFile Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS, watchOS Simulator, Windows

 

method LoadFromFile(FileName: String)

 

void LoadFromFile(String FileName)

 

func LoadFromFile(_ FileName: String)

 

void LoadFromFile(String FileName)

Parameters:

  • FileName:

Position  virtual    (declared in Stream)

Position in this stream.

 

property Position: Int64 read write;

 

Int64 Position { get; set; }

 

var Position: Int64 { get{} set{} }

 

Int64 Position { __get; __set; }

Read (^void, Int32): Int32    (declared in Stream)

Read from stream into buf.

 

method Read(buf: ^void; Count: Int32): Int32

 

Int32 Read(void* buf, Int32 Count)

 

func Read(_ buf: UnsafeMutablePointer<void>, _ Count: Int32) -> Int32

 

Int32 Read(void* buf, Int32 Count)

Parameters:

  • buf:
  • Count:

Read (array of Byte, Int32, Int32): Int32    (declared in Stream)

Read from stream into buffer.

 

method Read(Buffer: array of Byte; Offset: Int32; Count: Int32): Int32

 

Int32 Read(Byte[] Buffer, Int32 Offset, Int32 Count)

 

func Read(_ Buffer: Byte..., _ Offset: Int32, _ Count: Int32) -> Int32

 

Int32 Read(Byte[] Buffer, Int32 Offset, Int32 Count)

Parameters:

  • Buffer:
  • Offset:
  • Count:

Read (Span<Byte>): Int32  override virtual

 

method Read(aSpan: Span<Byte>): Int32

 

Int32 Read(Span<Byte> aSpan)

 

func Read(_ aSpan: Span<Byte>) -> Int32

 

Int32 Read(Span<Byte> aSpan)

Parameters:

  • aSpan:

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

Parameters:

  • a: left value
  • b: right value

SaveToFile Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS, watchOS Simulator, Windows

 

method SaveToFile(FileName: String)

 

void SaveToFile(String FileName)

 

func SaveToFile(_ FileName: String)

 

void SaveToFile(String FileName)

Parameters:

  • FileName:

Seek  override virtual

Seeks this stream.

 

method Seek(Offset: Int64; Origin: SeekOrigin): Int64

 

Int64 Seek(Int64 Offset, SeekOrigin Origin)

 

func Seek(_ Offset: Int64, _ Origin: SeekOrigin) -> Int64

 

Int64 Seek(Int64 Offset, SeekOrigin Origin)

Parameters:

  • Offset:
  • Origin:

SetLength  override virtual

Changes the length of this stream (if applicable).

 

method SetLength(value: Int64)

 

void SetLength(Int64 value)

 

func SetLength(_ value: Int64)

 

void SetLength(Int64 value)

Parameters:

  • value:

ToArray

Gets the content of this stream as byte array.

 

method ToArray: array of Byte

 

Byte[] ToArray()

 

func ToArray() -> Byte...

 

Byte[] ToArray()

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

Write (^void, Int32): Int32    (declared in Stream)

Writes buf to a stream.

 

method Write(buf: ^void; Count: Int32): Int32

 

Int32 Write(void* buf, Int32 Count)

 

func Write(_ buf: UnsafeMutablePointer<void>, _ Count: Int32) -> Int32

 

Int32 Write(void* buf, Int32 Count)

Parameters:

  • buf:
  • Count:

Write (array of Byte, Int32, Int32): Int32    (declared in Stream)

Writes a byte array to this stream.

 

method Write(Buffer: array of Byte; Offset: Int32; Count: Int32): Int32

 

Int32 Write(Byte[] Buffer, Int32 Offset, Int32 Count)

 

func Write(_ Buffer: Byte..., _ Offset: Int32, _ Count: Int32) -> Int32

 

Int32 Write(Byte[] Buffer, Int32 Offset, Int32 Count)

Parameters:

  • Buffer:
  • Offset:
  • Count:

Write (ImmutableSpan<Byte>): Int32  override virtual

Writes a span to this stream.

 

method Write(aSpan: ImmutableSpan<Byte>): Int32

 

Int32 Write(ImmutableSpan<Byte> aSpan)

 

func Write(_ aSpan: ImmutableSpan<Byte>) -> Int32

 

Int32 Write(ImmutableSpan<Byte> aSpan)

Parameters:

  • aSpan:

WriteTo

Write this stream to another stream.

 

method WriteTo(Destination: Stream)

 

void WriteTo(Stream Destination)

 

func WriteTo(_ Destination: Stream)

 

void WriteTo(Stream Destination)

Parameters:

  • Destination:

 

CanRead  override virtual

Should return true if this stream can be read from.

 

property CanRead: Boolean read;

 

Boolean CanRead { get; }

 

var CanRead: Boolean { get{} }

 

Boolean CanRead { __get; }

CanSeek  override virtual

Should return true if this stream can be seeked.

 

property CanSeek: Boolean read;

 

Boolean CanSeek { get; }

 

var CanSeek: Boolean { get{} }

 

Boolean CanSeek { __get; }

CanWrite  override virtual

Should return true if this stream can be written to.

 

property CanWrite: Boolean read;

 

Boolean CanWrite { get; }

 

var CanWrite: Boolean { get{} }

 

Boolean CanWrite { __get; }

Capacity

 

property Capacity: Int32 read write;

 

Int32 Capacity { get; set; }

 

var Capacity: Int32 { get{} set{} }

 

Int32 Capacity { __get; __set; }

Length  override virtual

Length of this stream.

 

property Length: Int64 read;

 

Int64 Length { get; }

 

var Length: Int64 { get{} }

 

Int64 Length { __get; }

Position  virtual    (declared in Stream)

Position in this stream.

 

property Position: Int64 read write;

 

Int64 Position { get; set; }

 

var Position: Int64 { get{} set{} }

 

Int64 Position { __get; __set; }

 

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

Parameters:

  • a: left value
  • b: right value

 

constructor    (declared in Object)

Default constructor.

 

constructor

 

MemoryStream()

 

init()

 

MemoryStream()

constructor (Int32)

Creates a memory stream with an initial capacity.

 

constructor(aCapacity: Int32)

 

MemoryStream(Int32 aCapacity)

 

init(_ aCapacity: Int32)

 

MemoryStream(Int32 aCapacity)

Parameters:

  • aCapacity:

Close  virtual    (declared in Stream)

Close this stream.

 

method Close

 

void Close()

 

func Close()

 

void Close()

CopyTo    (declared in Stream)

Copy the stream to another stream.

 

method CopyTo(Destination: Stream)

 

void CopyTo(Stream Destination)

 

func CopyTo(_ Destination: Stream)

 

void CopyTo(Stream Destination)

Parameters:

  • Destination:

Equals  virtual    (declared in Object)

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

Parameters:

  • obj: the reference to compare this with.

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

Flush  virtual    (declared in Stream)

Flush this stream (or do nothing if not applicable).

 

method Flush

 

void Flush()

 

func Flush()

 

void Flush()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

IsValid  protected override virtual

Returns true if this stream is still valid.

 

method IsValid: Boolean

 

Boolean IsValid()

 

func IsValid() -> Boolean

 

Boolean IsValid()

LoadFromFile Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS, watchOS Simulator, Windows

 

method LoadFromFile(FileName: String)

 

void LoadFromFile(String FileName)

 

func LoadFromFile(_ FileName: String)

 

void LoadFromFile(String FileName)

Parameters:

  • FileName:

Read (^void, Int32): Int32    (declared in Stream)

Read from stream into buf.

 

method Read(buf: ^void; Count: Int32): Int32

 

Int32 Read(void* buf, Int32 Count)

 

func Read(_ buf: UnsafeMutablePointer<void>, _ Count: Int32) -> Int32

 

Int32 Read(void* buf, Int32 Count)

Parameters:

  • buf:
  • Count:

Read (array of Byte, Int32, Int32): Int32    (declared in Stream)

Read from stream into buffer.

 

method Read(Buffer: array of Byte; Offset: Int32; Count: Int32): Int32

 

Int32 Read(Byte[] Buffer, Int32 Offset, Int32 Count)

 

func Read(_ Buffer: Byte..., _ Offset: Int32, _ Count: Int32) -> Int32

 

Int32 Read(Byte[] Buffer, Int32 Offset, Int32 Count)

Parameters:

  • Buffer:
  • Offset:
  • Count:

Read (Span<Byte>): Int32  override virtual

 

method Read(aSpan: Span<Byte>): Int32

 

Int32 Read(Span<Byte> aSpan)

 

func Read(_ aSpan: Span<Byte>) -> Int32

 

Int32 Read(Span<Byte> aSpan)

Parameters:

  • aSpan:

SaveToFile Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS, watchOS Simulator, Windows

 

method SaveToFile(FileName: String)

 

void SaveToFile(String FileName)

 

func SaveToFile(_ FileName: String)

 

void SaveToFile(String FileName)

Parameters:

  • FileName:

Seek  override virtual

Seeks this stream.

 

method Seek(Offset: Int64; Origin: SeekOrigin): Int64

 

Int64 Seek(Int64 Offset, SeekOrigin Origin)

 

func Seek(_ Offset: Int64, _ Origin: SeekOrigin) -> Int64

 

Int64 Seek(Int64 Offset, SeekOrigin Origin)

Parameters:

  • Offset:
  • Origin:

SetLength  override virtual

Changes the length of this stream (if applicable).

 

method SetLength(value: Int64)

 

void SetLength(Int64 value)

 

func SetLength(_ value: Int64)

 

void SetLength(Int64 value)

Parameters:

  • value:

ToArray

Gets the content of this stream as byte array.

 

method ToArray: array of Byte

 

Byte[] ToArray()

 

func ToArray() -> Byte...

 

Byte[] ToArray()

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

Write (^void, Int32): Int32    (declared in Stream)

Writes buf to a stream.

 

method Write(buf: ^void; Count: Int32): Int32

 

Int32 Write(void* buf, Int32 Count)

 

func Write(_ buf: UnsafeMutablePointer<void>, _ Count: Int32) -> Int32

 

Int32 Write(void* buf, Int32 Count)

Parameters:

  • buf:
  • Count:

Write (array of Byte, Int32, Int32): Int32    (declared in Stream)

Writes a byte array to this stream.

 

method Write(Buffer: array of Byte; Offset: Int32; Count: Int32): Int32

 

Int32 Write(Byte[] Buffer, Int32 Offset, Int32 Count)

 

func Write(_ Buffer: Byte..., _ Offset: Int32, _ Count: Int32) -> Int32

 

Int32 Write(Byte[] Buffer, Int32 Offset, Int32 Count)

Parameters:

  • Buffer:
  • Offset:
  • Count:

Write (ImmutableSpan<Byte>): Int32  override virtual

Writes a span to this stream.

 

method Write(aSpan: ImmutableSpan<Byte>): Int32

 

Int32 Write(ImmutableSpan<Byte> aSpan)

 

func Write(_ aSpan: ImmutableSpan<Byte>) -> Int32

 

Int32 Write(ImmutableSpan<Byte> aSpan)

Parameters:

  • aSpan:

WriteTo

Write this stream to another stream.

 

method WriteTo(Destination: Stream)

 

void WriteTo(Stream Destination)

 

func WriteTo(_ Destination: Stream)

 

void WriteTo(Stream Destination)

Parameters:

  • Destination: