Class IOUtils
Provides IO-related utility extensions
Inheritance
System.Object
IOUtils
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Azos
Assembly: Azos.dll
Syntax
public static class IOUtils
Methods
AllFileNames(String, Boolean)
Walks all file names in a directory
Declaration
public static IEnumerable<string> AllFileNames(this string fromFolder, bool recurse)
Parameters
| Type |
Name |
Description |
| System.String |
fromFolder |
|
| System.Boolean |
recurse |
|
Returns
| Type |
Description |
| System.Collections.Generic.IEnumerable<System.String> |
|
AllFileNamesThatMatch(String, String, Boolean)
Walks all file names that match the pattern in a directory
Declaration
public static IEnumerable<string> AllFileNamesThatMatch(this string fromFolder, string pattern, bool recurse)
Parameters
| Type |
Name |
Description |
| System.String |
fromFolder |
|
| System.String |
pattern |
|
| System.Boolean |
recurse |
|
Returns
| Type |
Description |
| System.Collections.Generic.IEnumerable<System.String> |
|
AsCharEnumerable(Stream)
Treats Stream contents as a enumerable of chars
Declaration
public static IEnumerable<char> AsCharEnumerable(this Stream stream)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
stream |
|
Returns
| Type |
Description |
| System.Collections.Generic.IEnumerable<System.Char> |
|
AsCharEnumerable(TextReader)
Treats TextReader contents as a enumerable of chars
Declaration
public static IEnumerable<char> AsCharEnumerable(this TextReader reader)
Parameters
| Type |
Name |
Description |
| System.IO.TextReader |
reader |
|
Returns
| Type |
Description |
| System.Collections.Generic.IEnumerable<System.Char> |
|
CopyStream(Stream, Stream, Boolean)
Copies one stream into another using temp buffer
Declaration
public static void CopyStream(Stream from, Stream to, bool noCache = false)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
from |
|
| System.IO.Stream |
to |
|
| System.Boolean |
noCache |
|
EnsureAccessibleDirectory(String)
Creates directory and immediately grants it accessibility rules for everyone if it does not exists,
or returns the existing directory
Declaration
public static DirectoryInfo EnsureAccessibleDirectory(string path)
Parameters
| Type |
Name |
Description |
| System.String |
path |
|
Returns
| Type |
Description |
| System.IO.DirectoryInfo |
|
EnsureDirectoryDeleted(String, Int32)
Tries to delete the specified directory if it exists BLOCKING for up to the specified interval until directory is PHYSICALLY deleted.
Returns true when directory either did not exist in the first place or was successfully deleted (with confirmation).
Returns false when directory could not be confirmed to be deleted within the specified timeout, this does not mean
that the OS will not delete the directory later, so calling this function in a loop is expected.
NOTE: Directory.Delete() does not guarantee that directory is no longer on disk upon its return
Declaration
public static bool EnsureDirectoryDeleted(string dirName, int timeoutMs = 2000)
Parameters
| Type |
Name |
Description |
| System.String |
dirName |
Directory to delete
|
| System.Int32 |
timeoutMs |
Timeout in ms
|
Returns
| Type |
Description |
| System.Boolean |
|
EnsureFileEventuallyDeleted(String)
Deleted file if it exists - does not block until file is deleted, the behavior is up to the OS
Declaration
public static void EnsureFileEventuallyDeleted(string fileName)
Parameters
| Type |
Name |
Description |
| System.String |
fileName |
Full file name with path
|
FromUTF8Bytes(Byte[], Int32, Int32)
Decode string with standart UTF8 decoder
Declaration
public static string FromUTF8Bytes(this byte[] buf, int idx = -1, int cnt = -1)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
idx |
|
| System.Int32 |
cnt |
|
Returns
| Type |
Description |
| System.String |
|
GuidFromNetworkByteOrder(Byte[], Int32)
Reads GUID using predictable Big Endian network byte ordering, use with complementing ToNetworkByteOrder(guid) method
Declaration
public static Guid GuidFromNetworkByteOrder(this byte[] buf, int offset = 0)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
offset |
|
Returns
| Type |
Description |
| System.Guid |
|
MemBufferEquals(Byte[], Byte[])
Returns true if both buffers contain the same number of the same bytes.
The implementation uses quad-word comparison as much as possible for speed.
Requires UNSAFE switch
Declaration
public static bool MemBufferEquals(this byte[] buf1, byte[] buf2)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf1 |
|
| System.Byte[] |
buf2 |
|
Returns
| Type |
Description |
| System.Boolean |
|
PackISO3CodeToInt(String)
Represents an ISO code as 4 byte integer filled with
up to 3 ASCII chars converted to upper case, the highest byte is free to be used by the application
Declaration
public static int PackISO3CodeToInt(string iso)
Parameters
| Type |
Name |
Description |
| System.String |
iso |
|
Returns
| Type |
Description |
| System.Int32 |
|
ReadBEInt32(Byte[])
Reads an integer encoded as big endian from buffer at index 0
Declaration
public static int ReadBEInt32(this byte[] buf)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
Returns
| Type |
Description |
| System.Int32 |
|
ReadBEInt32(Byte[], ref Int32)
Reads an integer encoded as big endian from buffer at the specified index
and increments the idx by the number of bytes read
Declaration
public static int ReadBEInt32(this byte[] buf, ref int idx)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
idx |
|
Returns
| Type |
Description |
| System.Int32 |
|
ReadBEInt32(Byte[], ref Int64)
Reads an integer encoded as big endian from buffer at the specified index
and increments the idx by the number of bytes read
Declaration
public static int ReadBEInt32(this byte[] buf, ref long idx)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int64 |
idx |
|
Returns
| Type |
Description |
| System.Int32 |
|
ReadBEInt32(Stream)
Reads an integer encoded as big endian from buffer at the specified index
Declaration
public static int ReadBEInt32(this Stream s)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
s |
|
Returns
| Type |
Description |
| System.Int32 |
|
ReadBEShort(Byte[], ref Int32)
Reads a short encoded as big endian from buffer at the specified index
Declaration
public static short ReadBEShort(this byte[] buf, ref int idx)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
idx |
|
Returns
| Type |
Description |
| System.Int16 |
|
ReadBEShort(Stream)
Reads a short encoded as big endian from stream
Declaration
public static short ReadBEShort(this Stream s)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
s |
|
Returns
| Type |
Description |
| System.Int16 |
|
ReadBEUInt32(Byte[])
Reads an unsigned integer encoded as big endian from buffer at index 0
Declaration
public static uint ReadBEUInt32(this byte[] buf)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
Returns
| Type |
Description |
| System.UInt32 |
|
ReadBEUInt32(Byte[], ref Int32)
Reads an unsigned integer encoded as big endian from buffer at the specified index
and increments the idx by the number of bytes read
Declaration
public static uint ReadBEUInt32(this byte[] buf, ref int idx)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
idx |
|
Returns
| Type |
Description |
| System.UInt32 |
|
ReadBEUInt32(Byte[], ref Int64)
Reads an unsigned integer encoded as big endian from buffer at the specified index
and increments the idx by the number of bytes read
Declaration
public static uint ReadBEUInt32(this byte[] buf, ref long idx)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int64 |
idx |
|
Returns
| Type |
Description |
| System.UInt32 |
|
ReadBEUInt64(Byte[], Int32)
Reads an integer encoded as big endian from buffer at the specified index
and increments the idx by the number of bytes read
Declaration
public static ulong ReadBEUInt64(this byte[] buf, int idx = 0)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
idx |
|
Returns
| Type |
Description |
| System.UInt64 |
|
ReadBEUInt64(Byte[], ref Int32)
Reads an integer encoded as big endian from buffer at the specified index
and increments the idx by the number of bytes read
Declaration
public static ulong ReadBEUInt64(this byte[] buf, ref int idx)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
idx |
|
Returns
| Type |
Description |
| System.UInt64 |
|
ReadBEUInt64(Stream)
Reads an integer encoded as big endian from buffer at the specified index
Declaration
public static ulong ReadBEUInt64(this Stream s)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
s |
|
Returns
| Type |
Description |
| System.UInt64 |
|
ReadBEUShort(Stream)
Reads an ushort encoded as big endian from stream
Declaration
public static ushort ReadBEUShort(this Stream s)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
s |
|
Returns
| Type |
Description |
| System.UInt16 |
|
ReadLEInt32(Byte[])
Reads an integer encoded as little endian from buffer at index 0
Declaration
public static int ReadLEInt32(this byte[] buf)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
Returns
| Type |
Description |
| System.Int32 |
|
ReadLEInt32(Byte[], ref Int32)
Reads an integer encoded as little endian from buffer at the specified index
and increments the idx by the number of bytes read
Declaration
public static int ReadLEInt32(this byte[] buf, ref int idx)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
idx |
|
Returns
| Type |
Description |
| System.Int32 |
|
ReadLEInt32(Byte[], ref Int64)
Reads an integer encoded as little endian from buffer at the specified index
and increments the idx by the number of bytes read
Declaration
public static int ReadLEInt32(this byte[] buf, ref long idx)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int64 |
idx |
|
Returns
| Type |
Description |
| System.Int32 |
|
ReadLEInt32(Stream)
Reads an integer encoded as little endian from buffer at the specified index
Declaration
public static int ReadLEInt32(this Stream s)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
s |
|
Returns
| Type |
Description |
| System.Int32 |
|
ReadLEShort(Byte[], ref Int32)
Reads a short encoded as little endian from buffer at the specified index
Declaration
public static short ReadLEShort(this byte[] buf, ref int idx)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
idx |
|
Returns
| Type |
Description |
| System.Int16 |
|
ReadLEShort(Stream)
Reads a short encoded as little endian from stream
Declaration
public static short ReadLEShort(this Stream s)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
s |
|
Returns
| Type |
Description |
| System.Int16 |
|
ReadLEUInt32(Byte[])
Reads an unsigned integer encoded as little endian from buffer at index 0
Declaration
public static uint ReadLEUInt32(this byte[] buf)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
Returns
| Type |
Description |
| System.UInt32 |
|
ReadLEUInt32(Byte[], ref Int32)
Reads an unsigned integer encoded as little endian from buffer at the specified index
and increments the idx by the number of bytes read
Declaration
public static uint ReadLEUInt32(this byte[] buf, ref int idx)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
idx |
|
Returns
| Type |
Description |
| System.UInt32 |
|
ReadLEUInt32(Byte[], ref Int64)
Reads an unsigned integer encoded as little endian from buffer at the specified index
and increments the idx by the number of bytes read
Declaration
public static uint ReadLEUInt32(this byte[] buf, ref long idx)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int64 |
idx |
|
Returns
| Type |
Description |
| System.UInt32 |
|
ReadLEUInt64(Byte[], Int32)
Reads an integer encoded as little endian from buffer at the specified index
and increments the idx by the number of bytes read
Declaration
public static ulong ReadLEUInt64(this byte[] buf, int idx = 0)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
idx |
|
Returns
| Type |
Description |
| System.UInt64 |
|
ReadLEUInt64(Byte[], ref Int32)
Reads an integer encoded as little endian from buffer at the specified index
and increments the idx by the number of bytes read
Declaration
public static ulong ReadLEUInt64(this byte[] buf, ref int idx)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
idx |
|
Returns
| Type |
Description |
| System.UInt64 |
|
ReadLEUInt64(Stream)
Reads an integer encoded as little endian from buffer at the specified index
Declaration
public static ulong ReadLEUInt64(this Stream s)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
s |
|
Returns
| Type |
Description |
| System.UInt64 |
|
ReadLEUShort(Stream)
Reads an ushort encoded as little endian from stream
Declaration
public static ushort ReadLEUShort(this Stream s)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
s |
|
Returns
| Type |
Description |
| System.UInt16 |
|
ReadLine(String)
Reads first line from the string
Declaration
public static string ReadLine(this string str)
Parameters
| Type |
Name |
Description |
| System.String |
str |
|
Returns
| Type |
Description |
| System.String |
|
RunAndCompleteProcess(String, String)
Runs specified process and waits for termination returning standard process output.
This is a blocking call
Declaration
public static string RunAndCompleteProcess(string name, string args)
Parameters
| Type |
Name |
Description |
| System.String |
name |
|
| System.String |
args |
|
Returns
| Type |
Description |
| System.String |
|
ToDumpString(Byte[], DumpFormat, Int32, Int32, Boolean, Encoding, Int32)
Convert a buffer to a printable string
Declaration
public static string ToDumpString(this byte[] buf, DumpFormat fmt, int offset = 0, int count = -1, bool eol = false, Encoding encoding = null, int maxLen = 0)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
Buffer to convert
|
| DumpFormat |
fmt |
Dumping format
|
| System.Int32 |
offset |
Starting index
|
| System.Int32 |
count |
Number of bytes to process (-1 means all bytes in the buffer)
|
| System.Boolean |
eol |
If true, terminate with end-of-line
|
| System.Text.Encoding |
encoding |
Encoding to use for writing data in Binary format
|
| System.Int32 |
maxLen |
Max length of the returned string. Pass 0 for unlimited length
|
Returns
| Type |
Description |
| System.String |
String dump
|
ToGUID(String)
Generates GUID based on a string MD5 hash
Declaration
public static Guid ToGUID(this string input)
Parameters
| Type |
Name |
Description |
| System.String |
input |
|
Returns
| Type |
Description |
| System.Guid |
|
ToIPEndPoint(String, Int32)
Resolve IP address by Name
Declaration
public static IPEndPoint ToIPEndPoint(this string epoint, int dfltPort = 0)
Parameters
| Type |
Name |
Description |
| System.String |
epoint |
An ip address or DNS host name with optional port separated by ':'
|
| System.Int32 |
dfltPort |
Port number to use if not supplied in endpoint string
|
Returns
| Type |
Description |
| System.Net.IPEndPoint |
IPEndPoint instance or null supplied string could not be parsed
|
ToMD5(Byte[])
Returns a MD5 hash of a byte array
Declaration
public static byte[] ToMD5(this byte[] input)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
input |
|
Returns
| Type |
Description |
| System.Byte[] |
|
ToMD5(Stream)
Returns a MD5 hash of a stream
Declaration
public static byte[] ToMD5(this Stream input)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
input |
|
Returns
| Type |
Description |
| System.Byte[] |
|
ToMD5(String)
Returns a MD5 hash of a UTF8 string represented as byte[]
Declaration
public static byte[] ToMD5(this string input)
Parameters
| Type |
Name |
Description |
| System.String |
input |
|
Returns
| Type |
Description |
| System.Byte[] |
|
ToMD5String(Byte[])
Returns a MD5 hash of a byte[]represented as hex string
Declaration
public static string ToMD5String(this byte[] input)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
input |
|
Returns
| Type |
Description |
| System.String |
|
ToMD5String(Stream)
Returns a MD5 hash of a stream represented as hex string
Declaration
public static string ToMD5String(this Stream input)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
input |
|
Returns
| Type |
Description |
| System.String |
|
ToMD5String(String)
Returns a MD5 hash of a UTF8 string represented as hex string
Declaration
public static string ToMD5String(this string input)
Parameters
| Type |
Name |
Description |
| System.String |
input |
|
Returns
| Type |
Description |
| System.String |
|
ToNetworkByteOrder(Guid)
Encodes GUID using predictable Big Endian network byte ordering, use with complementing GuidFromNetworkByteOrder(byte[]) method
Declaration
public static byte[] ToNetworkByteOrder(this Guid guid)
Parameters
| Type |
Name |
Description |
| System.Guid |
guid |
|
Returns
| Type |
Description |
| System.Byte[] |
|
ToUTF8Bytes(String)
Encodes string with standart UTF8 encoder
Declaration
public static byte[] ToUTF8Bytes(this string str)
Parameters
| Type |
Name |
Description |
| System.String |
str |
|
Returns
| Type |
Description |
| System.Byte[] |
|
UnpackISO3CodeFromInt(Int32)
Unpacks an ISO code from int which was packed with PackISO3CodeToInt
Declaration
public static string UnpackISO3CodeFromInt(int iso)
Parameters
| Type |
Name |
Description |
| System.Int32 |
iso |
|
Returns
| Type |
Description |
| System.String |
|
WriteBEInt32(Byte[], Int32)
Writes an integer encoded as big endian to buffer at index 0
Declaration
public static void WriteBEInt32(this byte[] buf, int value)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
value |
|
WriteBEInt32(Byte[], Int32, Int32)
Writes an integer encoded as big endian to buffer at the specified index
Declaration
public static void WriteBEInt32(this byte[] buf, int idx, int value)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
idx |
|
| System.Int32 |
value |
|
WriteBEInt32(Stream, Int32)
Writes an integer encoded as big endian to the given stream
Declaration
public static void WriteBEInt32(this Stream s, int value)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
s |
|
| System.Int32 |
value |
|
WriteBEShort(Byte[], Int32, Int16)
Writes a short encoded as big endian to buffer at the specified index
Declaration
public static void WriteBEShort(this byte[] buf, int idx, short value)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
idx |
|
| System.Int16 |
value |
|
WriteBEShort(Stream, Int16)
Writes a short encoded as big endian to the given stream
Declaration
public static void WriteBEShort(this Stream s, short value)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
s |
|
| System.Int16 |
value |
|
WriteBEUInt32(Byte[], Int32, UInt32)
Writes an unsigned integer encoded as big endian to buffer at the specified index
Declaration
public static void WriteBEUInt32(this byte[] buf, int idx, uint value)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
idx |
|
| System.UInt32 |
value |
|
WriteBEUInt32(Byte[], UInt32)
Writes an unsigned integer encoded as big endian to buffer at index 0
Declaration
public static void WriteBEUInt32(this byte[] buf, uint value)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.UInt32 |
value |
|
WriteBEUInt64(Byte[], Int32, UInt64)
Writes an unsigned long integer encoded as big endian to buffer at the specified index
Declaration
public static void WriteBEUInt64(this byte[] buf, int idx, ulong value)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
idx |
|
| System.UInt64 |
value |
|
WriteBEUInt64(Byte[], UInt64)
Writes an unsigned long integer encoded as big endian to buffer at the beginning
Declaration
public static void WriteBEUInt64(this byte[] buf, ulong value)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.UInt64 |
value |
|
WriteBEUInt64(Stream, UInt64)
Writes an unsigned long integer encoded as big endian to the given stream
Declaration
public static void WriteBEUInt64(this Stream s, ulong value)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
s |
|
| System.UInt64 |
value |
|
WriteBEUShort(Stream, UInt16)
Writes an ushort encoded as big endian to the given stream
Declaration
public static void WriteBEUShort(this Stream s, ushort value)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
s |
|
| System.UInt16 |
value |
|
WriteLEInt32(Byte[], Int32)
Writes an integer encoded as little endian to buffer at index 0
Declaration
public static void WriteLEInt32(this byte[] buf, int value)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
value |
|
WriteLEInt32(Byte[], Int32, Int32)
Writes an integer encoded as little endian to buffer at the specified index
Declaration
public static void WriteLEInt32(this byte[] buf, int idx, int value)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
idx |
|
| System.Int32 |
value |
|
WriteLEInt32(Stream, Int32)
Writes an integer encoded as little endian to the given stream
Declaration
public static void WriteLEInt32(this Stream s, int value)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
s |
|
| System.Int32 |
value |
|
WriteLEShort(Byte[], Int32, Int16)
Writes a short encoded as little endian to buffer at the specified index
Declaration
public static void WriteLEShort(this byte[] buf, int idx, short value)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
idx |
|
| System.Int16 |
value |
|
WriteLEShort(Stream, Int16)
Writes a short encoded as little endian to the given stream
Declaration
public static void WriteLEShort(this Stream s, short value)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
s |
|
| System.Int16 |
value |
|
WriteLEUInt32(Byte[], Int32, UInt32)
Writes an unsigned integer encoded as little endian to buffer at the specified index
Declaration
public static void WriteLEUInt32(this byte[] buf, int idx, uint value)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
idx |
|
| System.UInt32 |
value |
|
WriteLEUInt32(Byte[], UInt32)
Writes an unsigned integer encoded as little endian to buffer at index 0
Declaration
public static void WriteLEUInt32(this byte[] buf, uint value)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.UInt32 |
value |
|
WriteLEUInt64(Byte[], Int32, UInt64)
Writes an unsigned long integer encoded as little endian to buffer at the specified index
Declaration
public static void WriteLEUInt64(this byte[] buf, int idx, ulong value)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.Int32 |
idx |
|
| System.UInt64 |
value |
|
WriteLEUInt64(Byte[], UInt64)
Writes an unsigned long integer encoded as little endian to buffer at the beginning
Declaration
public static void WriteLEUInt64(this byte[] buf, ulong value)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buf |
|
| System.UInt64 |
value |
|
WriteLEUInt64(Stream, UInt64)
Writes an unsigned long integer encoded as little endian to the given stream
Declaration
public static void WriteLEUInt64(this Stream s, ulong value)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
s |
|
| System.UInt64 |
value |
|
WriteLEUShort(Stream, UInt16)
Writes an ushort encoded as little endian to the given stream
Declaration
public static void WriteLEUShort(this Stream s, ushort value)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
s |
|
| System.UInt16 |
value |
|