MemoryStream
Overview
Stream implementation that stores data in memory
Location
-
Reference:
- Elements.dll .NET, .NET Core 6.0, .NET Standard 2.0
- elements.jar Cooper
- Elements.fx Island, ToffeeV2
- libElements.fx Toffee
- Namespace: RemObjects.Elements.RTL
- Platforms: .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island, Toffee, ToffeeV2
-
Ancestry:
- Stream | WrappedPlatformStream | MemoryStream .NET, .NET Core 6.0, .NET Standard 2.0, Island
- Stream | MemoryStream Cooper, Toffee, ToffeeV2
- Stream | WrappedPlatformStream | MemoryStream .NET, .NET Core 6.0, .NET Standard 2.0, Island
constructor .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island, ToffeeV2
constructor
MemoryStream()
init()
MemoryStream()
Sub New()
constructor init() Toffee
init(init )
Parameters:
- :
constructor (Int32)
constructor(aCapacity: Int32)
MemoryStream(Int32 aCapacity)
init(_ aCapacity: Int32)
MemoryStream(Integer aCapacity)
Sub New(aCapacity As Int32)
Parameters:
- aCapacity:
constructor (PlatformStream) (declared in WrappedPlatformStream) .NET, .NET Core 6.0, .NET Standard 2.0, Island
constructor(aStream: PlatformStream)
MemoryStream(PlatformStream aStream)
init(_ aStream: PlatformStream)
Sub New(aStream As PlatformStream)
Parameters:
- aStream:
constructor (array of Byte)
constructor(aValue: array of Byte)
MemoryStream(Byte[] aValue)
init(_ aValue: Byte...)
MemoryStream(Byte[] aValue)
Sub New(aValue As Byte())
Parameters:
- aValue:
Parameters:
- aValue:
- aCanWrite:
constructor (ImmutableBinary)
constructor(aValue: ImmutableBinary)
MemoryStream(ImmutableBinary aValue)
init(_ aValue: ImmutableBinary)
MemoryStream(ImmutableBinary aValue)
Sub New(aValue As ImmutableBinary)
Parameters:
- aValue:
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; }
ReadOnly Property Bytes() As Byte()
CanRead override
Returns true.
property CanRead: Boolean read;
Boolean CanRead { get; }
var CanRead: Boolean { get{} }
Boolean CanRead { __get; }
ReadOnly Property CanRead() As Boolean
CanSeek override
Returns true.
property CanSeek: Boolean read;
Boolean CanSeek { get; }
var CanSeek: Boolean { get{} }
Boolean CanSeek { __get; }
ReadOnly Property CanSeek() As Boolean
CanWrite override
Returns true.
property CanWrite: Boolean read;
Boolean CanWrite { get; }
var CanWrite: Boolean { get{} }
Boolean CanWrite { __get; }
ReadOnly Property CanWrite() As Boolean
Clear .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island, ToffeeV2
Removes all data from this stream and resets the length to 0.
method Clear
void Clear()
func Clear()
void Clear()
Sub Clear()
Clear Clear() virtual Toffee
func Clear(Clear )
Parameters:
- :
close Cooper
method close
void close()
func close()
void close()
Sub close()
Close override Toffee
func Close(Close )
Parameters:
- :
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)
Sub CopyTo(Destination As Stream)
Parameters:
- Destination:
Dispose (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island
Close the stream and underlying resources.
method Dispose
void Dispose()
func Dispose()
Sub Dispose()
Flush override .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island, ToffeeV2
Do nothing.
method Flush
void Flush()
func Flush()
void Flush()
Sub Flush()
Flush Flush() override Toffee
func Flush(Flush )
Parameters:
- :
GetBytes protected virtual Toffee
func GetBytes(GetBytes ) -> Byte...
Parameters:
- :
GetCanRead protected virtual Toffee
func GetCanRead(GetCanRead ) -> Boolean
Parameters:
- :
GetCanSeek protected virtual Toffee
func GetCanSeek(GetCanSeek ) -> Boolean
Parameters:
- :
GetCanWrite protected virtual Toffee
func GetCanWrite(GetCanWrite ) -> Boolean
Parameters:
- :
GetLength override virtual (declared in WrappedPlatformStream) .NET, .NET Core 6.0, .NET Standard 2.0, Island
Returns the length of this stream.
GetLength GetLength(): Int64 override Toffee
func GetLength(GetLength ) -> Int64
Parameters:
- :
GetPosition override virtual (declared in WrappedPlatformStream) .NET, .NET Core 6.0, .NET Standard 2.0, Island
Returns the current position in this stream.
method GetPosition: Int64
Int64 GetPosition()
func GetPosition() -> Int64
Function GetPosition() As Int64
GetPosition GetPosition(): Int64 override Toffee
func GetPosition(GetPosition ) -> Int64
Parameters:
- :
Length override Cooper, Toffee, ToffeeV2
Returns the size of this stream.
Position override Cooper, Toffee, ToffeeV2
Returns the current position.
Read from this stream. Returns the nr of bytes retreived., or 0 when the end has been reached.
Parameters:
- Buffer:
- Count:
Read from this stream. Returns the nr of bytes retreived, or 0 when the end has been reached.
Parameters:
- Buffer:
- Offset:
- Count:
ReadByte virtual (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island, ToffeeV2
Reads a byte or returns -1 if the stream has reached the end
method ReadByte: Int32
Int32 ReadByte()
func ReadByte() -> Int32
Integer ReadByte()
Function ReadByte() As Int32
ReadByte (Byte): Boolean (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- aResult:
func ReadByte(ReadByte ) -> Int32
Parameters:
- :
ReadGuid (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- aResult:
ReadUInt16BE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- aResult:
ReadUInt16LE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- aResult:
ReadUInt32BE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- aResult:
ReadUInt32LE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- aResult:
ReadUInt64BE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- aResult:
ReadUInt64LE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- aResult:
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.
Parameters:
- Value:
SetPosition override virtual (declared in WrappedPlatformStream) .NET, .NET Core 6.0, .NET Standard 2.0, Island
Sets the absolute position in the stream.
method SetPosition(Value: Int64)
void SetPosition(Int64 Value)
func SetPosition(_ Value: Int64)
Sub SetPosition(Value As Int64)
Parameters:
- Value:
ToArray .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island, ToffeeV2
Copies the data into an array and returns it.
method ToArray: array of Byte
Byte[] ToArray()
func ToArray() -> Byte...
Byte[] ToArray()
Function ToArray() As Byte()
ToArray ToArray(): array of Byte virtual Toffee
func ToArray(ToArray ) -> Byte...
Parameters:
- :
Parameters:
- Buffer:
Writes data to the stream.
Parameters:
- Buffer:
- Count:
Writes data to the stream.
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)
Sub WriteByte(aValue As Byte)
Parameters:
- aValue:
WriteGuid (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- value:
WriteTo
Copy this stream to another stream.
method WriteTo(Destination: Stream)
void WriteTo(Stream Destination)
func WriteTo(_ Destination: Stream)
void WriteTo(Stream Destination)
Sub WriteTo(Destination As Stream)
Parameters:
- Destination:
WriteUInt16BE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- value:
WriteUInt16LE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- value:
WriteUInt32BE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- value:
WriteUInt32LE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- value:
WriteUInt64BE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- value:
WriteUInt64LE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- value:
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; }
ReadOnly Property Bytes() As Byte()
CanRead override
Returns true.
property CanRead: Boolean read;
Boolean CanRead { get; }
var CanRead: Boolean { get{} }
Boolean CanRead { __get; }
ReadOnly Property CanRead() As Boolean
CanSeek override
Returns true.
property CanSeek: Boolean read;
Boolean CanSeek { get; }
var CanSeek: Boolean { get{} }
Boolean CanSeek { __get; }
ReadOnly Property CanSeek() As Boolean
CanWrite override
Returns true.
property CanWrite: Boolean read;
Boolean CanWrite { get; }
var CanWrite: Boolean { get{} }
Boolean CanWrite { __get; }
ReadOnly Property CanWrite() As Boolean
Length override Cooper, Toffee, ToffeeV2
Returns the size of this stream.
Position override Cooper, Toffee, ToffeeV2
Returns the current position.
constructor .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island, ToffeeV2
constructor
MemoryStream()
init()
MemoryStream()
Sub New()
constructor init() Toffee
init(init )
Parameters:
- :
constructor (Int32)
constructor(aCapacity: Int32)
MemoryStream(Int32 aCapacity)
init(_ aCapacity: Int32)
MemoryStream(Integer aCapacity)
Sub New(aCapacity As Int32)
Parameters:
- aCapacity:
constructor (PlatformStream) (declared in WrappedPlatformStream) .NET, .NET Core 6.0, .NET Standard 2.0, Island
constructor(aStream: PlatformStream)
MemoryStream(PlatformStream aStream)
init(_ aStream: PlatformStream)
Sub New(aStream As PlatformStream)
Parameters:
- aStream:
constructor (array of Byte)
constructor(aValue: array of Byte)
MemoryStream(Byte[] aValue)
init(_ aValue: Byte...)
MemoryStream(Byte[] aValue)
Sub New(aValue As Byte())
Parameters:
- aValue:
Parameters:
- aValue:
- aCanWrite:
constructor (ImmutableBinary)
constructor(aValue: ImmutableBinary)
MemoryStream(ImmutableBinary aValue)
init(_ aValue: ImmutableBinary)
MemoryStream(ImmutableBinary aValue)
Sub New(aValue As ImmutableBinary)
Parameters:
- aValue:
Clear .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island, ToffeeV2
Removes all data from this stream and resets the length to 0.
method Clear
void Clear()
func Clear()
void Clear()
Sub Clear()
Clear Clear() virtual Toffee
func Clear(Clear )
Parameters:
- :
close Cooper
method close
void close()
func close()
void close()
Sub close()
Close override Toffee
func Close(Close )
Parameters:
- :
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)
Sub CopyTo(Destination As Stream)
Parameters:
- Destination:
Dispose (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island
Close the stream and underlying resources.
method Dispose
void Dispose()
func Dispose()
Sub Dispose()
Flush override .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island, ToffeeV2
Do nothing.
method Flush
void Flush()
func Flush()
void Flush()
Sub Flush()
Flush Flush() override Toffee
func Flush(Flush )
Parameters:
- :
GetBytes protected virtual Toffee
func GetBytes(GetBytes ) -> Byte...
Parameters:
- :
GetCanRead protected virtual Toffee
func GetCanRead(GetCanRead ) -> Boolean
Parameters:
- :
GetCanSeek protected virtual Toffee
func GetCanSeek(GetCanSeek ) -> Boolean
Parameters:
- :
GetCanWrite protected virtual Toffee
func GetCanWrite(GetCanWrite ) -> Boolean
Parameters:
- :
GetLength override virtual (declared in WrappedPlatformStream) .NET, .NET Core 6.0, .NET Standard 2.0, Island
Returns the length of this stream.
GetLength GetLength(): Int64 override Toffee
func GetLength(GetLength ) -> Int64
Parameters:
- :
GetPosition override virtual (declared in WrappedPlatformStream) .NET, .NET Core 6.0, .NET Standard 2.0, Island
Returns the current position in this stream.
method GetPosition: Int64
Int64 GetPosition()
func GetPosition() -> Int64
Function GetPosition() As Int64
GetPosition GetPosition(): Int64 override Toffee
func GetPosition(GetPosition ) -> Int64
Parameters:
- :
Read from this stream. Returns the nr of bytes retreived., or 0 when the end has been reached.
Parameters:
- Buffer:
- Count:
Read from this stream. Returns the nr of bytes retreived, or 0 when the end has been reached.
Parameters:
- Buffer:
- Offset:
- Count:
ReadByte virtual (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island, ToffeeV2
Reads a byte or returns -1 if the stream has reached the end
method ReadByte: Int32
Int32 ReadByte()
func ReadByte() -> Int32
Integer ReadByte()
Function ReadByte() As Int32
ReadByte (Byte): Boolean (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- aResult:
func ReadByte(ReadByte ) -> Int32
Parameters:
- :
ReadGuid (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- aResult:
ReadUInt16BE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- aResult:
ReadUInt16LE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- aResult:
ReadUInt32BE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- aResult:
ReadUInt32LE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- aResult:
ReadUInt64BE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- aResult:
ReadUInt64LE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- aResult:
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.
Parameters:
- Value:
SetPosition override virtual (declared in WrappedPlatformStream) .NET, .NET Core 6.0, .NET Standard 2.0, Island
Sets the absolute position in the stream.
method SetPosition(Value: Int64)
void SetPosition(Int64 Value)
func SetPosition(_ Value: Int64)
Sub SetPosition(Value As Int64)
Parameters:
- Value:
ToArray .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island, ToffeeV2
Copies the data into an array and returns it.
method ToArray: array of Byte
Byte[] ToArray()
func ToArray() -> Byte...
Byte[] ToArray()
Function ToArray() As Byte()
ToArray ToArray(): array of Byte virtual Toffee
func ToArray(ToArray ) -> Byte...
Parameters:
- :
Parameters:
- Buffer:
Writes data to the stream.
Parameters:
- Buffer:
- Count:
Writes data to the stream.
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)
Sub WriteByte(aValue As Byte)
Parameters:
- aValue:
WriteGuid (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- value:
WriteTo
Copy this stream to another stream.
method WriteTo(Destination: Stream)
void WriteTo(Stream Destination)
func WriteTo(_ Destination: Stream)
void WriteTo(Stream Destination)
Sub WriteTo(Destination As Stream)
Parameters:
- Destination:
WriteUInt16BE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- value:
WriteUInt16LE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- value:
WriteUInt32BE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- value:
WriteUInt32LE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- value:
WriteUInt64BE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- value:
WriteUInt64LE (declared in Stream) .NET, .NET Core 6.0, .NET Standard 2.0, Island, Toffee, ToffeeV2
Parameters:
- value: