![]() |
Energy Core Library
|
Builder for byte arrays. More...
Public Member Functions | |
| ByteArrayBuilder () | |
| Constructor More... | |
| ByteArrayBuilder (byte[] data) | |
| Constructor from byte array More... | |
| ByteArrayBuilder (System.IO.Stream stream) | |
| Constructor from System.IO.Stream More... | |
| void | Dispose () |
| void | Clear () |
| Clear More... | |
| ByteArrayBuilder | Append (byte value) |
| Append byte value to a stream. More... | |
| ByteArrayBuilder | Append (byte[] data) |
| Append byte array to a stream. More... | |
| ByteArrayBuilder | Append (byte value, int count) |
| Append byte array initialized to value to a stream. More... | |
| ByteArrayBuilder | Append (sbyte value) |
| Append signed byte value to a stream. More... | |
| ByteArrayBuilder | Append (char value) |
| Append char value to a stream. More... | |
| ByteArrayBuilder | Append (int value) |
| Append integer value to a stream. More... | |
| ByteArrayBuilder | Append (long value) |
| Append long integer value to a stream. More... | |
| ByteArrayBuilder | Append (uint value) |
| Append integer value to a stream. More... | |
| ByteArrayBuilder | Append (ulong value) |
| Append unsigned long integer value to a stream. More... | |
| ByteArrayBuilder | Append (short value) |
| Append short value to a stream. More... | |
| ByteArrayBuilder | Append (ushort value) |
| Append unsigned short value to a stream. More... | |
| ByteArrayBuilder | Append (bool value) |
| Append unsigned short value to a stream. More... | |
| ByteArrayBuilder | Append (double value) |
| Append double value to a stream. More... | |
| ByteArrayBuilder | Append (float value) |
| Append double value to a stream. More... | |
| ByteArrayBuilder | Append (Guid guid) |
| Append GUID value to a stream. More... | |
| ByteArrayBuilder | Append (decimal value) |
| Append decimal value to a stream. More... | |
| ByteArrayBuilder | Append (string value, System.Text.Encoding encoding, bool raw) |
| Append string to a stream. More... | |
| ByteArrayBuilder | Append (string value, System.Text.Encoding encoding) |
| Append string to a stream. More... | |
| ByteArrayBuilder | Append (string value) |
| Append string to a stream with default encoding. More... | |
| ByteArrayBuilder | Append (string value, bool raw) |
| Append string to a stream with default encoding. More... | |
| ByteArrayBuilder | Append (DateTime value) |
| Append DateTime to a stream. More... | |
| byte | ReadByte () |
| Read byte value from a stream More... | |
| char | ReadChar () |
| Read char value from a stream More... | |
| sbyte | ReadSByte () |
| Read signed byte value from a stream More... | |
| byte [] | ReadArray () |
| Read byte array from a stream More... | |
| byte [] | ReadArray (int length) |
| Read array of bytes from stream More... | |
| int | ReadInt () |
| Read integer value from a stream More... | |
| long | ReadLong () |
| Read long integer value from a stream More... | |
| short | ReadShort () |
| Read short integer value from a stream More... | |
| uint | ReadUInt () |
| Read unsigned integer value from a stream More... | |
| ulong | ReadULong () |
| Read unsigned long integer value from a stream More... | |
| ushort | ReadUShort () |
| Read unsigned short integer value from a stream More... | |
| double | ReadDouble () |
| Read double value from a stream More... | |
| float | ReadFloat () |
| Read float value from a stream More... | |
| decimal | ReadDecimal () |
| Read decimal value from a stream More... | |
| bool | ReadBool () |
| Read boolean value from a stream More... | |
| DateTime | ReadDateTime () |
| Read DateTime value from a stream More... | |
| Guid | ReadGuid () |
| Read Guid from a stram More... | |
| string | ReadString (int length, System.Text.Encoding encoding) |
| Read string from a stream More... | |
| string | ReadString (int length) |
| Read string from a stream More... | |
| string | ReadString (System.Text.Encoding encoding) |
| Read string from a stream More... | |
| string | ReadString () |
| Read string from a stream More... | |
| string | ReadBase64 () |
| Read BASE64 from stream More... | |
| void | WriteByte (byte value) |
| Write byte value to a stream More... | |
| void | WriteChar (char value) |
| Write unsigned byte value to a stream More... | |
| void | WriteSByte (sbyte value) |
| Write signed byte value to a stream More... | |
| void | WriteArray (byte[] data) |
| Write byte array to a stream More... | |
| void | WriteInt (int value) |
| Write integer value to a stream More... | |
| void | WriteLong (long value) |
| Write long integer value to a stream More... | |
| void | WriteUInt (uint value) |
| Write unsigned integer value to a stream More... | |
| void | WriteULong (uint value) |
| Write unsigned long More... | |
| void | WriteShort (short value) |
| Write short value to a stream More... | |
| void | WriteUShort (ushort value) |
| Write unsigned short value to a stream More... | |
| void | WriteBool (bool value) |
| Write boolean value to a stream More... | |
| void | WriteDateTime (DateTime value) |
| Append DateTime to a stream More... | |
| void | WriteGuid (Guid guid) |
| Write GUID value to a stream More... | |
| void | WriteString (string value, System.Text.Encoding encoding) |
| Write string to a stream More... | |
| void | WriteString (string value) |
| Write string to a stream with default encoding More... | |
| void | WriteBase64 (string base64) |
| Write bytes from BASE64 string More... | |
| void | Seek (int position) |
| Set an absolute position in the builder for reading. More... | |
| void | Rewind () |
| Move to the beginning of stream. More... | |
| void | Tail () |
| Move to the end of stream. More... | |
| void | Skip (int count) |
| Skip next bytes in stream. More... | |
| byte [] | ToArray () |
| Returns the builder as an array of bytes. More... | |
| byte [] | ToArray (int position, int length) |
| Returns the builder as an array of bytes More... | |
| override string | ToString () |
| string | ToString (System.Text.Encoding encoding) |
| string | ToBase64 () |
Static Public Member Functions | |
| static int | Compare (byte[] array1, byte[] array2) |
| Compare two arrays of bytes. Returns 0 if contains the same values. More... | |
| static bool | AreEqual (params byte[][] array) |
| static byte [] | ToByteArray (int[] array) |
| Convert array of integers to a byte array. More... | |
| static byte [] | ToByteArray (int[] array, int width) |
| Convert array of integers to a byte array. More... | |
| static byte [] | ToByteArray (int[] array, bool reverse) |
| Convert array of integers to a byte array. More... | |
| static byte [] | ToByteArray (int[] array, int width, bool reverse) |
| Convert array of integers to a byte array. More... | |
| static byte [] | SubArray (byte[] array, int start, int count) |
| Get sub array of bytes from an existing one. More... | |
| static byte [] | SubArray (byte[] array, int start, int count, bool pad) |
| Get sub array of bytes from an existing one. More... | |
Properties | |
| byte | this[int index] [get, set] |
| Accessor More... | |
| bool | Empty [get] |
| Returns true if object contains no data. More... | |
| int | Length [get] |
| Current data length. More... | |
| int | Capacity [get, set] |
| Buffer capacity. More... | |
| System.Text.Encoding | Encoding [get, set] |
| String encoding. More... | |
| bool | End [get] |
| Indicates that position marker is at end of buffer More... | |
Builder for byte arrays.
| Energy.Base.ByteArrayBuilder.ByteArrayBuilder | ( | ) |
Constructor
| Energy.Base.ByteArrayBuilder.ByteArrayBuilder | ( | byte [] | data | ) |
Constructor from byte array
| data |
| Energy.Base.ByteArrayBuilder.ByteArrayBuilder | ( | System.IO.Stream | stream | ) |
Constructor from System.IO.Stream
| stream |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | byte | value | ) |
Append byte value to a stream.
| value |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | byte [] | data | ) |
Append byte array to a stream.
| data |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | byte | value, |
| int | count | ||
| ) |
Append byte array initialized to value to a stream.
| value | |
| count |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | sbyte | value | ) |
Append signed byte value to a stream.
| value |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | char | value | ) |
Append char value to a stream.
| value |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | int | value | ) |
Append integer value to a stream.
| value |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | long | value | ) |
Append long integer value to a stream.
| value |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | uint | value | ) |
Append integer value to a stream.
| value |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | ulong | value | ) |
Append unsigned long integer value to a stream.
| value |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | short | value | ) |
Append short value to a stream.
| value |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | ushort | value | ) |
Append unsigned short value to a stream.
| value |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | bool | value | ) |
Append unsigned short value to a stream.
| value |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | double | value | ) |
Append double value to a stream.
| value |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | float | value | ) |
Append double value to a stream.
| value |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | Guid | guid | ) |
Append GUID value to a stream.
| guid |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | decimal | value | ) |
Append decimal value to a stream.
| value |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | string | value, |
| System.Text.Encoding | encoding, | ||
| bool | raw | ||
| ) |
Append string to a stream.
| value | |
| encoding | |
| raw |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | string | value, |
| System.Text.Encoding | encoding | ||
| ) |
Append string to a stream.
| value | |
| encoding |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | string | value | ) |
Append string to a stream with default encoding.
| value |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | string | value, |
| bool | raw | ||
| ) |
Append string to a stream with default encoding.
| value | |
| raw |
| ByteArrayBuilder Energy.Base.ByteArrayBuilder.Append | ( | DateTime | value | ) |
Append DateTime to a stream.
| value |
|
static |
| void Energy.Base.ByteArrayBuilder.Clear | ( | ) |
Clear
|
static |
Compare two arrays of bytes. Returns 0 if contains the same values.
| array1 | |
| array2 |
| void Energy.Base.ByteArrayBuilder.Dispose | ( | ) |
| byte [] Energy.Base.ByteArrayBuilder.ReadArray | ( | ) |
Read byte array from a stream
| byte [] Energy.Base.ByteArrayBuilder.ReadArray | ( | int | length | ) |
Read array of bytes from stream
| length |
| string Energy.Base.ByteArrayBuilder.ReadBase64 | ( | ) |
Read BASE64 from stream
| bool Energy.Base.ByteArrayBuilder.ReadBool | ( | ) |
Read boolean value from a stream
| byte Energy.Base.ByteArrayBuilder.ReadByte | ( | ) |
Read byte value from a stream
| char Energy.Base.ByteArrayBuilder.ReadChar | ( | ) |
Read char value from a stream
| DateTime Energy.Base.ByteArrayBuilder.ReadDateTime | ( | ) |
Read DateTime value from a stream
| decimal Energy.Base.ByteArrayBuilder.ReadDecimal | ( | ) |
Read decimal value from a stream
| double Energy.Base.ByteArrayBuilder.ReadDouble | ( | ) |
Read double value from a stream
| float Energy.Base.ByteArrayBuilder.ReadFloat | ( | ) |
Read float value from a stream
| Guid Energy.Base.ByteArrayBuilder.ReadGuid | ( | ) |
Read Guid from a stram
| int Energy.Base.ByteArrayBuilder.ReadInt | ( | ) |
Read integer value from a stream
| long Energy.Base.ByteArrayBuilder.ReadLong | ( | ) |
Read long integer value from a stream
| sbyte Energy.Base.ByteArrayBuilder.ReadSByte | ( | ) |
Read signed byte value from a stream
| short Energy.Base.ByteArrayBuilder.ReadShort | ( | ) |
Read short integer value from a stream
| string Energy.Base.ByteArrayBuilder.ReadString | ( | int | length, |
| System.Text.Encoding | encoding | ||
| ) |
Read string from a stream
| length | |
| encoding |
| string Energy.Base.ByteArrayBuilder.ReadString | ( | int | length | ) |
Read string from a stream
| length |
| string Energy.Base.ByteArrayBuilder.ReadString | ( | System.Text.Encoding | encoding | ) |
Read string from a stream
| encoding |
| string Energy.Base.ByteArrayBuilder.ReadString | ( | ) |
Read string from a stream
| uint Energy.Base.ByteArrayBuilder.ReadUInt | ( | ) |
Read unsigned integer value from a stream
| ulong Energy.Base.ByteArrayBuilder.ReadULong | ( | ) |
Read unsigned long integer value from a stream
| ushort Energy.Base.ByteArrayBuilder.ReadUShort | ( | ) |
Read unsigned short integer value from a stream
| void Energy.Base.ByteArrayBuilder.Rewind | ( | ) |
Move to the beginning of stream.
| void Energy.Base.ByteArrayBuilder.Seek | ( | int | position | ) |
Set an absolute position in the builder for reading.
| position |
| void Energy.Base.ByteArrayBuilder.Skip | ( | int | count | ) |
Skip next bytes in stream.
| count |
|
static |
Get sub array of bytes from an existing one.
| array | |
| start | |
| count |
|
static |
Get sub array of bytes from an existing one.
| array | |
| start | |
| count | |
| pad |
| void Energy.Base.ByteArrayBuilder.Tail | ( | ) |
Move to the end of stream.
| byte [] Energy.Base.ByteArrayBuilder.ToArray | ( | ) |
Returns the builder as an array of bytes.
| byte [] Energy.Base.ByteArrayBuilder.ToArray | ( | int | position, |
| int | length | ||
| ) |
Returns the builder as an array of bytes
| length | |
| position |
| string Energy.Base.ByteArrayBuilder.ToBase64 | ( | ) |
|
static |
Convert array of integers to a byte array.
| array |
|
static |
Convert array of integers to a byte array.
| array | |
| width |
|
static |
Convert array of integers to a byte array.
| array | |
| reverse |
|
static |
Convert array of integers to a byte array.
| array | |
| width | |
| reverse |
| override string Energy.Base.ByteArrayBuilder.ToString | ( | ) |
| string Energy.Base.ByteArrayBuilder.ToString | ( | System.Text.Encoding | encoding | ) |
| void Energy.Base.ByteArrayBuilder.WriteArray | ( | byte [] | data | ) |
Write byte array to a stream
| data |
| void Energy.Base.ByteArrayBuilder.WriteBase64 | ( | string | base64 | ) |
Write bytes from BASE64 string
| base64 |
| void Energy.Base.ByteArrayBuilder.WriteBool | ( | bool | value | ) |
Write boolean value to a stream
| value |
| void Energy.Base.ByteArrayBuilder.WriteByte | ( | byte | value | ) |
Write byte value to a stream
| value |
| void Energy.Base.ByteArrayBuilder.WriteChar | ( | char | value | ) |
Write unsigned byte value to a stream
| value |
| void Energy.Base.ByteArrayBuilder.WriteDateTime | ( | DateTime | value | ) |
Append DateTime to a stream
| value |
| void Energy.Base.ByteArrayBuilder.WriteGuid | ( | Guid | guid | ) |
Write GUID value to a stream
| guid |
| void Energy.Base.ByteArrayBuilder.WriteInt | ( | int | value | ) |
Write integer value to a stream
| value |
| void Energy.Base.ByteArrayBuilder.WriteLong | ( | long | value | ) |
Write long integer value to a stream
| value |
| void Energy.Base.ByteArrayBuilder.WriteSByte | ( | sbyte | value | ) |
Write signed byte value to a stream
| value |
| void Energy.Base.ByteArrayBuilder.WriteShort | ( | short | value | ) |
Write short value to a stream
| value |
| void Energy.Base.ByteArrayBuilder.WriteString | ( | string | value, |
| System.Text.Encoding | encoding | ||
| ) |
Write string to a stream
| value | |
| encoding |
| void Energy.Base.ByteArrayBuilder.WriteString | ( | string | value | ) |
Write string to a stream with default encoding
| value |
| void Energy.Base.ByteArrayBuilder.WriteUInt | ( | uint | value | ) |
Write unsigned integer value to a stream
| value |
| void Energy.Base.ByteArrayBuilder.WriteULong | ( | uint | value | ) |
Write unsigned long
| value |
| void Energy.Base.ByteArrayBuilder.WriteUShort | ( | ushort | value | ) |
Write unsigned short value to a stream
| value |
|
getset |
Buffer capacity.
|
get |
Returns true if object contains no data.
|
getset |
String encoding.
|
get |
Indicates that position marker is at end of buffer
|
get |
Current data length.
|
getset |
Accessor
| index |