mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-07-06 09:43:16 +02:00
Updated Utilities
This commit is contained in:
parent
4e850aa38a
commit
ff368056c5
6 changed files with 85 additions and 6 deletions
|
@ -134,10 +134,22 @@ namespace Utilities
|
|||
}
|
||||
}
|
||||
|
||||
public static void WriteUTF8String(Stream stream, string value)
|
||||
{
|
||||
byte[] bytes = UnicodeEncoding.UTF8.GetBytes(value);
|
||||
stream.Write(bytes, 0, bytes.Length);
|
||||
}
|
||||
|
||||
public static void WriteUTF16String(Stream stream, string value)
|
||||
{
|
||||
byte[] bytes = UnicodeEncoding.Unicode.GetBytes(value);
|
||||
stream.Write(bytes, 0, bytes.Length);
|
||||
}
|
||||
|
||||
public static void WriteUTF16BEString(Stream stream, string value)
|
||||
{
|
||||
byte[] bytes = UnicodeEncoding.BigEndianUnicode.GetBytes(value);
|
||||
stream.Write(bytes, 0, bytes.Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue