Overview

Wrapper around stream to read/write binary data in little endian order.

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
constructor(aStream: Stream)
BinaryStream(Stream aStream)
BinaryStream(Stream aStream)
Sub New(aStream As Stream)

Parameters:

  • aStream:

constructor(aStream: Stream; aEncoding: Encoding)
BinaryStream(Stream aStream, Encoding aEncoding)
init(_ aStream: Stream, _ aEncoding: Encoding)
BinaryStream(Stream aStream, Encoding aEncoding)
Sub New(aStream As Stream, aEncoding As Encoding)

Parameters:

  • aStream:
  • aEncoding:

BaseStream

Returns the stream this wrapper is writing to/reading from.

property BaseStream: Stream read;
Stream BaseStream { get; }
var BaseStream: Stream { get{} }
Stream BaseStream { __get; }
ReadOnly Property BaseStream() As Stream

PeekChar

Look ahead 1 character and returns it (or -1 if it's the end of teh stream)

Function PeekChar() As Int32

Read

Reads a single character from this stream, returns -1 if the end of the stream has been reached


Read an array of bytes from the stream.

method Read(Count: Int32): array of Byte
func Read(_ Count: Int32) -> Byte...
Byte[] Read(Integer Count)
Function Read(Count As Int32) As Byte()

Parameters:

  • Count:

ReadByte

Read a byte from this stream.

Function ReadByte() As Byte

ReadDouble

Read a double from this stream.

method ReadDouble: Double
func ReadDouble() -> Double
Function ReadDouble() As Double

ReadInt16

Read a 2 byte integer from this stream.

func ReadInt16() -> Int16
Function ReadInt16() As Int16

ReadInt32

Read a 4 byte integer from this stream.

func ReadInt32() -> Int32
Function ReadInt32() As Int32

ReadInt64

Read an 8 byte integer from this stream.

func ReadInt64() -> Int64
Function ReadInt64() As Int64

ReadSByte

Read a (signed) byte from this stream

func ReadSByte() -> SByte
Function ReadSByte() As SByte

ReadSingle

Read a single precision float from this stream.

method ReadSingle: Single
func ReadSingle() -> Single
Function ReadSingle() As Single

ReadString

Read a string from this stream, count is the number of bytes to read.

method ReadString(Count: Int32): String
String ReadString(Int32 Count)
func ReadString(_ Count: Int32) -> String
String ReadString(Integer Count)
Function ReadString(Count As Int32) As String

Parameters:

  • Count:

Write binary data to the stream.

method Write(aValue: array of Byte; Offset: Int32; Count: Int32)
void Write(Byte[] aValue, Int32 Offset, Int32 Count)
func Write(_ aValue: Byte..., _ Offset: Int32, _ Count: Int32)
void Write(Byte[] aValue, Integer Offset, Integer Count)
Sub Write(aValue As Byte(), Offset As Int32, Count As Int32)

Parameters:

  • aValue:
  • Offset:
  • Count:

Write a byte to this stream.

method Write(aValue: Byte)
func Write(_ aValue: Byte)
Sub Write(aValue As Byte)

Parameters:

  • aValue:

WriteByte

Write a byte to this stream.

method WriteByte(Value: Byte)
void WriteByte(Byte Value)
func WriteByte(_ Value: Byte)
void WriteByte(Byte Value)
Sub WriteByte(Value As Byte)

Parameters:

  • Value:

WriteDouble

Write a double to this stream.

method WriteDouble(Value: Double)
void WriteDouble(Double Value)
func WriteDouble(_ Value: Double)
void WriteDouble(Double Value)
Sub WriteDouble(Value As Double)

Parameters:

  • Value:

WriteInt16

Write an int16 to this stream.

method WriteInt16(Value: Int16)
void WriteInt16(Int16 Value)
func WriteInt16(_ Value: Int16)
void WriteInt16(SmallInt Value)
Sub WriteInt16(Value As Int16)

Parameters:

  • Value:

WriteInt32

Write an int32 to this stream.

method WriteInt32(Value: Int32)
void WriteInt32(Int32 Value)
func WriteInt32(_ Value: Int32)
void WriteInt32(Integer Value)
Sub WriteInt32(Value As Int32)

Parameters:

  • Value:

WriteInt64

Write an int64 to this stream.

method WriteInt64(Value: Int64)
void WriteInt64(Int64 Value)
func WriteInt64(_ Value: Int64)
void WriteInt64(Int64 Value)
Sub WriteInt64(Value As Int64)

Parameters:

  • Value:

WriteSByte

Write a signed byte to this stream.

method WriteSByte(Value: SByte)
void WriteSByte(SByte Value)
func WriteSByte(_ Value: SByte)
void WriteSByte(SByte Value)
Sub WriteSByte(Value As SByte)

Parameters:

  • Value:

WriteSingle

Write a string to this stream.

method WriteSingle(Value: Single)
void WriteSingle(Single Value)
func WriteSingle(_ Value: Single)
void WriteSingle(Single Value)
Sub WriteSingle(Value As Single)

Parameters:

  • Value:

WriteString

Write a string to this stream.

method WriteString(aString: String)
void WriteString(String aString)
func WriteString(_ aString: String)
void WriteString(String aString)
Sub WriteString(aString As String)

Parameters:

  • aString:

BaseStream

Returns the stream this wrapper is writing to/reading from.

property BaseStream: Stream read;
Stream BaseStream { get; }
var BaseStream: Stream { get{} }
Stream BaseStream { __get; }
ReadOnly Property BaseStream() As Stream
constructor(aStream: Stream)
BinaryStream(Stream aStream)
BinaryStream(Stream aStream)
Sub New(aStream As Stream)

Parameters:

  • aStream:

constructor(aStream: Stream; aEncoding: Encoding)
BinaryStream(Stream aStream, Encoding aEncoding)
init(_ aStream: Stream, _ aEncoding: Encoding)
BinaryStream(Stream aStream, Encoding aEncoding)
Sub New(aStream As Stream, aEncoding As Encoding)

Parameters:

  • aStream:
  • aEncoding:

PeekChar

Look ahead 1 character and returns it (or -1 if it's the end of teh stream)

Function PeekChar() As Int32

Read

Reads a single character from this stream, returns -1 if the end of the stream has been reached


Read an array of bytes from the stream.

method Read(Count: Int32): array of Byte
func Read(_ Count: Int32) -> Byte...
Byte[] Read(Integer Count)
Function Read(Count As Int32) As Byte()

Parameters:

  • Count:

ReadByte

Read a byte from this stream.

Function ReadByte() As Byte

ReadDouble

Read a double from this stream.

method ReadDouble: Double
func ReadDouble() -> Double
Function ReadDouble() As Double

ReadInt16

Read a 2 byte integer from this stream.

func ReadInt16() -> Int16
Function ReadInt16() As Int16

ReadInt32

Read a 4 byte integer from this stream.

func ReadInt32() -> Int32
Function ReadInt32() As Int32

ReadInt64

Read an 8 byte integer from this stream.

func ReadInt64() -> Int64
Function ReadInt64() As Int64

ReadSByte

Read a (signed) byte from this stream

func ReadSByte() -> SByte
Function ReadSByte() As SByte

ReadSingle

Read a single precision float from this stream.

method ReadSingle: Single
func ReadSingle() -> Single
Function ReadSingle() As Single

ReadString

Read a string from this stream, count is the number of bytes to read.

method ReadString(Count: Int32): String
String ReadString(Int32 Count)
func ReadString(_ Count: Int32) -> String
String ReadString(Integer Count)
Function ReadString(Count As Int32) As String

Parameters:

  • Count:

Write binary data to the stream.

method Write(aValue: array of Byte; Offset: Int32; Count: Int32)
void Write(Byte[] aValue, Int32 Offset, Int32 Count)
func Write(_ aValue: Byte..., _ Offset: Int32, _ Count: Int32)
void Write(Byte[] aValue, Integer Offset, Integer Count)
Sub Write(aValue As Byte(), Offset As Int32, Count As Int32)

Parameters:

  • aValue:
  • Offset:
  • Count:

Write a byte to this stream.

method Write(aValue: Byte)
func Write(_ aValue: Byte)
Sub Write(aValue As Byte)

Parameters:

  • aValue:

WriteByte

Write a byte to this stream.

method WriteByte(Value: Byte)
void WriteByte(Byte Value)
func WriteByte(_ Value: Byte)
void WriteByte(Byte Value)
Sub WriteByte(Value As Byte)

Parameters:

  • Value:

WriteDouble

Write a double to this stream.

method WriteDouble(Value: Double)
void WriteDouble(Double Value)
func WriteDouble(_ Value: Double)
void WriteDouble(Double Value)
Sub WriteDouble(Value As Double)

Parameters:

  • Value:

WriteInt16

Write an int16 to this stream.

method WriteInt16(Value: Int16)
void WriteInt16(Int16 Value)
func WriteInt16(_ Value: Int16)
void WriteInt16(SmallInt Value)
Sub WriteInt16(Value As Int16)

Parameters:

  • Value:

WriteInt32

Write an int32 to this stream.

method WriteInt32(Value: Int32)
void WriteInt32(Int32 Value)
func WriteInt32(_ Value: Int32)
void WriteInt32(Integer Value)
Sub WriteInt32(Value As Int32)

Parameters:

  • Value:

WriteInt64

Write an int64 to this stream.

method WriteInt64(Value: Int64)
void WriteInt64(Int64 Value)
func WriteInt64(_ Value: Int64)
void WriteInt64(Int64 Value)
Sub WriteInt64(Value As Int64)

Parameters:

  • Value:

WriteSByte

Write a signed byte to this stream.

method WriteSByte(Value: SByte)
void WriteSByte(SByte Value)
func WriteSByte(_ Value: SByte)
void WriteSByte(SByte Value)
Sub WriteSByte(Value As SByte)

Parameters:

  • Value:

WriteSingle

Write a string to this stream.

method WriteSingle(Value: Single)
void WriteSingle(Single Value)
func WriteSingle(_ Value: Single)
void WriteSingle(Single Value)
Sub WriteSingle(Value As Single)

Parameters:

  • Value:

WriteString

Write a string to this stream.

method WriteString(aString: String)
void WriteString(String aString)
func WriteString(_ aString: String)
void WriteString(String aString)
Sub WriteString(aString As String)

Parameters:

  • aString: