MemoryStream

Overview

Stream implementation that stores data in memory

Location

 

constructor .NET, .NET Standard 2.0, Cooper, Island, Toffee

Creates a new intance.

 

constructor

 

MemoryStream()

 

init()

 

MemoryStream()

constructor (array of Byte): InstanceType .NET, .NET Standard 2.0, Cooper, Island, Toffee

Creates a new instance with aValue as content.

 

constructor(aValue: array of Byte)

 

MemoryStream(Byte[] aValue)

 

init(_ aValue: Byte...)

 

MemoryStream(Byte[] aValue)

Parameters:

  • aValue:

constructor (array of Byte, Boolean): InstanceType .NET, .NET Standard 2.0, Cooper, Island, Toffee

Creates a new instance with aValue as content.

 

constructor(aValue: array of Byte; aCanWrite: Boolean)

 

MemoryStream(Byte[] aValue, Boolean aCanWrite)

 

init(_ aValue: Byte..., _ aCanWrite: Boolean)

 

MemoryStream(Byte[] aValue, Boolean aCanWrite)

Parameters:

  • aValue:
  • aCanWrite:

constructor (ImmutableBinary): InstanceType .NET, .NET Standard 2.0, Cooper, Island, Toffee

Creates a new instance with aValue as content.

 

constructor(aValue: ImmutableBinary)

 

MemoryStream(ImmutableBinary aValue)

 

init(_ aValue: ImmutableBinary)

 

MemoryStream(ImmutableBinary aValue)

Parameters:

  • aValue:

constructor (Int32): InstanceType .NET, .NET Standard 2.0, Cooper, Island, Toffee

Creates a new instance with the given capacity.

 

constructor(aCapacity: Int32)

 

MemoryStream(Int32 aCapacity)

 

init(_ aCapacity: Int32)

 

MemoryStream(Integer aCapacity)

Parameters:

  • aCapacity:

constructor init ToffeeV2

Create a new instance.

 

func constructor init()

constructor init (array of Byte) ToffeeV2

Creates a new instance with aValue as content.

 

func constructor init(_ aValue: Byte...)

Parameters:

  • aValue:

constructor init (array of Byte, Boolean) ToffeeV2

Creates a new instance with aValue as content.

 

func constructor init(_ aValue: Byte..., _ aCanWrite: Boolean)

Parameters:

  • aValue:
  • aCanWrite:

constructor init (ImmutableBinary) ToffeeV2

Creates a new instance with aValue as content.

 

func constructor init(_ aValue: ImmutableBinary)

Parameters:

  • aValue:

constructor init (Int32) ToffeeV2

Creates a new instance with the given capacity.

 

func constructor init(_ aCapacity: Int32)

Parameters:

  • aCapacity:

Bytes

Gets access to the underlying storage; does not create a copy, so the byte array could exceed the size of the stream.

 

property Bytes: array of Byte read;

 

Byte[] Bytes { get; }

 

var Bytes: Byte... { get{} }

 

Byte[] Bytes { __get; }

CanRead  override

Returns true.

 

property CanRead: Boolean read;

 

Boolean CanRead { get; }

 

var CanRead: Boolean { get{} }

 

Boolean CanRead { __get; }

CanSeek  override

Returns true.

 

property CanSeek: Boolean read;

 

Boolean CanSeek { get; }

 

var CanSeek: Boolean { get{} }

 

Boolean CanSeek { __get; }

CanWrite  override

Returns true.

 

property CanWrite: Boolean read;

 

Boolean CanWrite { get; }

 

var CanWrite: Boolean { get{} }

 

Boolean CanWrite { __get; }

Clear

Removes all data from this stream and resets the length to 0.

 

method Clear

 

void Clear()

 

func Clear()

 

void Clear()

Close  override

Close the stream and all resources attached to it.

 

method Close

 

void Close()

 

func Close()

 

void Close()

CopyTo  virtual    (declared in Stream)

Copy the content of this stream to another

 

method CopyTo(Destination: Stream)

 

void CopyTo(Stream Destination)

 

func CopyTo(_ Destination: Stream)

 

void CopyTo(Stream Destination)

Parameters:

  • Destination:

Dispose    (declared in Stream) .NET, .NET Standard 2.0, Island

Close the stream and underlying resources.

 

method Dispose

 

void Dispose()

 

func Dispose()

Flush  override

Do nothing.

 

method Flush

 

void Flush()

 

func Flush()

 

void Flush()

GetLength  override virtual    (declared in WrappedPlatformStream) .NET, .NET Standard 2.0, Island

Returns the length of this stream.

 

method GetLength: Int64

 

Int64 GetLength()

 

func GetLength() -> Int64

GetPosition  override virtual    (declared in WrappedPlatformStream) .NET, .NET Standard 2.0, Island

Returns the current position in this stream.

 

method GetPosition: Int64

 

Int64 GetPosition()

 

func GetPosition() -> Int64

Length  override Cooper, Toffee, ToffeeV2

Returns the size of this stream.

 

var Length: Int64 { get{} }

 

Int64 Length { __get; }

Position  override Cooper, Toffee, ToffeeV2

Returns the current position.

 

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

 

Int64 Position { __get; __set; }

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

Read from this stream. Returns the nr of bytes retreived., or 0 when the end has been reached.

 

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

 

Int32 Read(Byte[] Buffer, Int32 Count)

 

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

 

Integer Read(Byte[] Buffer, Integer Count)

Parameters:

  • Buffer:
  • Count:

Read (array of Byte, Integer, Integer): Integer  override Cooper, Toffee, ToffeeV2

Read from this stream. Returns the nr of bytes retreived, or 0 when the end has been reached.

 

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

 

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

Parameters:

  • Buffer:
  • Offset:
  • Count:

ReadByte  virtual    (declared in Stream)

Reads a byte or returns -1 if the stream has reached the end

 

method ReadByte: Int32

 

Int32 ReadByte()

 

func ReadByte() -> Int32

 

Integer ReadByte()

Seek  override Cooper, Toffee, ToffeeV2

this method can be used to change the position of the stream, relative to the current position, start or end of the stream. Returns the new position.

 

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

 

Int64 Seek(Int64 Offset, SeekOrigin Origin)

Parameters:

  • Offset:
  • Origin:

SetLength Cooper, Toffee, ToffeeV2

Change the length of this stream.

 

func SetLength(_ Value: Int64)

 

void SetLength(Int64 Value)

Parameters:

  • Value:

SetPosition  override virtual    (declared in WrappedPlatformStream) .NET, .NET Standard 2.0, Island

Sets the absolute position in the stream.

 

method SetPosition(Value: Int64)

 

void SetPosition(Int64 Value)

 

func SetPosition(_ Value: Int64)

Parameters:

  • Value:

ToArray

Copies the data into an array and returns it.

 

method ToArray: array of Byte

 

Byte[] ToArray()

 

func ToArray() -> Byte...

 

Byte[] ToArray()

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

Writes data to the stream.

 

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

 

Int32 Write(Byte[] Buffer, Int32 Count)

 

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

 

Integer Write(Byte[] Buffer, Integer Count)

Parameters:

  • Buffer:
  • Count:

Write (array of Byte, Integer, Integer): Integer  override Cooper, Toffee, ToffeeV2

Writes data to the stream.

 

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

 

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

Parameters:

  • Buffer:
  • Offset:
  • Count:

WriteByte  virtual    (declared in Stream)

Writes data to the stream.

 

method WriteByte(aValue: Byte)

 

void WriteByte(Byte aValue)

 

func WriteByte(_ aValue: Byte)

 

void WriteByte(Byte aValue)

Parameters:

  • aValue:

WriteTo

Copy this stream to another stream.

 

method WriteTo(Destination: Stream)

 

void WriteTo(Stream Destination)

 

func WriteTo(_ Destination: Stream)

 

void WriteTo(Stream Destination)

Parameters:

  • Destination:

 

Bytes

Gets access to the underlying storage; does not create a copy, so the byte array could exceed the size of the stream.

 

property Bytes: array of Byte read;

 

Byte[] Bytes { get; }

 

var Bytes: Byte... { get{} }

 

Byte[] Bytes { __get; }

CanRead  override

Returns true.

 

property CanRead: Boolean read;

 

Boolean CanRead { get; }

 

var CanRead: Boolean { get{} }

 

Boolean CanRead { __get; }

CanSeek  override

Returns true.

 

property CanSeek: Boolean read;

 

Boolean CanSeek { get; }

 

var CanSeek: Boolean { get{} }

 

Boolean CanSeek { __get; }

CanWrite  override

Returns true.

 

property CanWrite: Boolean read;

 

Boolean CanWrite { get; }

 

var CanWrite: Boolean { get{} }

 

Boolean CanWrite { __get; }

Length  override Cooper, Toffee, ToffeeV2

Returns the size of this stream.

 

var Length: Int64 { get{} }

 

Int64 Length { __get; }

Position  override Cooper, Toffee, ToffeeV2

Returns the current position.

 

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

 

Int64 Position { __get; __set; }

 

constructor .NET, .NET Standard 2.0, Cooper, Island, Toffee

Creates a new intance.

 

constructor

 

MemoryStream()

 

init()

 

MemoryStream()

constructor init ToffeeV2

Create a new instance.

 

func constructor init()

constructor init (array of Byte) ToffeeV2

Creates a new instance with aValue as content.

 

func constructor init(_ aValue: Byte...)

Parameters:

  • aValue:

constructor init (array of Byte, Boolean) ToffeeV2

Creates a new instance with aValue as content.

 

func constructor init(_ aValue: Byte..., _ aCanWrite: Boolean)

Parameters:

  • aValue:
  • aCanWrite:

constructor init (ImmutableBinary) ToffeeV2

Creates a new instance with aValue as content.

 

func constructor init(_ aValue: ImmutableBinary)

Parameters:

  • aValue:

constructor init (Int32) ToffeeV2

Creates a new instance with the given capacity.

 

func constructor init(_ aCapacity: Int32)

Parameters:

  • aCapacity:

constructor (array of Byte): InstanceType .NET, .NET Standard 2.0, Cooper, Island, Toffee

Creates a new instance with aValue as content.

 

constructor(aValue: array of Byte)

 

MemoryStream(Byte[] aValue)

 

init(_ aValue: Byte...)

 

MemoryStream(Byte[] aValue)

Parameters:

  • aValue:

constructor (array of Byte, Boolean): InstanceType .NET, .NET Standard 2.0, Cooper, Island, Toffee

Creates a new instance with aValue as content.

 

constructor(aValue: array of Byte; aCanWrite: Boolean)

 

MemoryStream(Byte[] aValue, Boolean aCanWrite)

 

init(_ aValue: Byte..., _ aCanWrite: Boolean)

 

MemoryStream(Byte[] aValue, Boolean aCanWrite)

Parameters:

  • aValue:
  • aCanWrite:

constructor (ImmutableBinary): InstanceType .NET, .NET Standard 2.0, Cooper, Island, Toffee

Creates a new instance with aValue as content.

 

constructor(aValue: ImmutableBinary)

 

MemoryStream(ImmutableBinary aValue)

 

init(_ aValue: ImmutableBinary)

 

MemoryStream(ImmutableBinary aValue)

Parameters:

  • aValue:

constructor (Int32): InstanceType .NET, .NET Standard 2.0, Cooper, Island, Toffee

Creates a new instance with the given capacity.

 

constructor(aCapacity: Int32)

 

MemoryStream(Int32 aCapacity)

 

init(_ aCapacity: Int32)

 

MemoryStream(Integer aCapacity)

Parameters:

  • aCapacity:

Clear

Removes all data from this stream and resets the length to 0.

 

method Clear

 

void Clear()

 

func Clear()

 

void Clear()

Close  override

Close the stream and all resources attached to it.

 

method Close

 

void Close()

 

func Close()

 

void Close()

CopyTo  virtual    (declared in Stream)

Copy the content of this stream to another

 

method CopyTo(Destination: Stream)

 

void CopyTo(Stream Destination)

 

func CopyTo(_ Destination: Stream)

 

void CopyTo(Stream Destination)

Parameters:

  • Destination:

Dispose    (declared in Stream) .NET, .NET Standard 2.0, Island

Close the stream and underlying resources.

 

method Dispose

 

void Dispose()

 

func Dispose()

Flush  override

Do nothing.

 

method Flush

 

void Flush()

 

func Flush()

 

void Flush()

GetLength  override virtual    (declared in WrappedPlatformStream) .NET, .NET Standard 2.0, Island

Returns the length of this stream.

 

method GetLength: Int64

 

Int64 GetLength()

 

func GetLength() -> Int64

GetPosition  override virtual    (declared in WrappedPlatformStream) .NET, .NET Standard 2.0, Island

Returns the current position in this stream.

 

method GetPosition: Int64

 

Int64 GetPosition()

 

func GetPosition() -> Int64

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

Read from this stream. Returns the nr of bytes retreived., or 0 when the end has been reached.

 

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

 

Int32 Read(Byte[] Buffer, Int32 Count)

 

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

 

Integer Read(Byte[] Buffer, Integer Count)

Parameters:

  • Buffer:
  • Count:

Read (array of Byte, Integer, Integer): Integer  override Cooper, Toffee, ToffeeV2

Read from this stream. Returns the nr of bytes retreived, or 0 when the end has been reached.

 

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

 

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

Parameters:

  • Buffer:
  • Offset:
  • Count:

ReadByte  virtual    (declared in Stream)

Reads a byte or returns -1 if the stream has reached the end

 

method ReadByte: Int32

 

Int32 ReadByte()

 

func ReadByte() -> Int32

 

Integer ReadByte()

Seek  override Cooper, Toffee, ToffeeV2

this method can be used to change the position of the stream, relative to the current position, start or end of the stream. Returns the new position.

 

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

 

Int64 Seek(Int64 Offset, SeekOrigin Origin)

Parameters:

  • Offset:
  • Origin:

SetLength Cooper, Toffee, ToffeeV2

Change the length of this stream.

 

func SetLength(_ Value: Int64)

 

void SetLength(Int64 Value)

Parameters:

  • Value:

SetPosition  override virtual    (declared in WrappedPlatformStream) .NET, .NET Standard 2.0, Island

Sets the absolute position in the stream.

 

method SetPosition(Value: Int64)

 

void SetPosition(Int64 Value)

 

func SetPosition(_ Value: Int64)

Parameters:

  • Value:

ToArray

Copies the data into an array and returns it.

 

method ToArray: array of Byte

 

Byte[] ToArray()

 

func ToArray() -> Byte...

 

Byte[] ToArray()

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

Writes data to the stream.

 

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

 

Int32 Write(Byte[] Buffer, Int32 Count)

 

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

 

Integer Write(Byte[] Buffer, Integer Count)

Parameters:

  • Buffer:
  • Count:

Write (array of Byte, Integer, Integer): Integer  override Cooper, Toffee, ToffeeV2

Writes data to the stream.

 

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

 

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

Parameters:

  • Buffer:
  • Offset:
  • Count:

WriteByte  virtual    (declared in Stream)

Writes data to the stream.

 

method WriteByte(aValue: Byte)

 

void WriteByte(Byte aValue)

 

func WriteByte(_ aValue: Byte)

 

void WriteByte(Byte aValue)

Parameters:

  • aValue:

WriteTo

Copy this stream to another stream.

 

method WriteTo(Destination: Stream)

 

void WriteTo(Stream Destination)

 

func WriteTo(_ Destination: Stream)

 

void WriteTo(Stream Destination)

Parameters:

  • Destination: