ByteHelper 类
程序集: Fantasy.Net.dll
语法
public static class ByteHelper
方法
|
编辑本文
查看源代码
GetBytes(int, byte[])
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void GetBytes(this int value, byte[] buffer)
参数
异常
|
编辑本文
查看源代码
GetBytes(long, byte[])
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void GetBytes(this long value, byte[] buffer)
参数
异常
|
编辑本文
查看源代码
GetBytes(ref uint, byte[])
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void GetBytes(this ref uint value, byte[] buffer)
参数
异常
|
编辑本文
查看源代码
MergeBytes(byte[], byte[])
声明
public static byte[] MergeBytes(byte[] bytes, byte[] otherBytes)
参数
类型 |
名称 |
描述 |
byte[] |
bytes |
第一个字节数组
|
byte[] |
otherBytes |
第二个字节数组
|
返回
|
编辑本文
查看源代码
ReadInt32(FileStream)
声明
public static int ReadInt32(FileStream stream)
参数
返回
|
编辑本文
查看源代码
ReadInt32(MemoryStream)
声明
public static int ReadInt32(MemoryStream stream)
参数
返回
|
编辑本文
查看源代码
ReadInt64(FileStream)
声明
public static long ReadInt64(FileStream stream)
参数
返回
|
编辑本文
查看源代码
ReadInt64(MemoryStream)
声明
public static long ReadInt64(MemoryStream stream)
参数
返回
|
编辑本文
查看源代码
ToHex(byte)
声明
public static string ToHex(this byte b)
参数
返回
|
编辑本文
查看源代码
ToHex(byte[])
声明
public static string ToHex(this byte[] bytes)
参数
返回
|
编辑本文
查看源代码
ToHex(byte[], int, int)
将字节数组的指定范围按十六进制格式转换为字符串表示。
声明
public static string ToHex(this byte[] bytes, int offset, int count)
参数
返回
|
编辑本文
查看源代码
ToHex(byte[], string)
声明
public static string ToHex(this byte[] bytes, string format)
参数
返回
|
编辑本文
查看源代码
ToReadableSpeed(long)
声明
public static string ToReadableSpeed(this long byteCount)
参数
类型 |
名称 |
描述 |
long |
byteCount |
字节数
|
返回
|
编辑本文
查看源代码
ToReadableSpeed(ulong)
声明
public static string ToReadableSpeed(this ulong byteCount)
参数
类型 |
名称 |
描述 |
ulong |
byteCount |
字节数
|
返回
|
编辑本文
查看源代码
ToStr(byte[])
声明
public static string ToStr(this byte[] bytes)
参数
返回
|
编辑本文
查看源代码
ToStr(byte[], int, int)
声明
public static string ToStr(this byte[] bytes, int index, int count)
参数
返回
|
编辑本文
查看源代码
Utf8ToStr(byte[])
声明
public static string Utf8ToStr(this byte[] bytes)
参数
返回
|
编辑本文
查看源代码
Utf8ToStr(byte[], int, int)
将字节数组的指定范围按 UTF-8 编码转换为字符串表示。
声明
public static string Utf8ToStr(this byte[] bytes, int index, int count)
参数
返回
|
编辑本文
查看源代码
WriteBytes(MemoryStream, int)
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void WriteBytes(this MemoryStream memoryStream, int value)
参数
异常
|
编辑本文
查看源代码
WriteBytes(MemoryStream, long)
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void WriteBytes(this MemoryStream memoryStream, long value)
参数
异常
|
编辑本文
查看源代码
WriteBytes(MemoryStream, uint)
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void WriteBytes(this MemoryStream memoryStream, uint value)
参数
异常
|
编辑本文
查看源代码
WriteTo(byte[], int, byte)
声明
public static void WriteTo(this byte[] bytes, int offset, byte num)
参数
|
编辑本文
查看源代码
WriteTo(byte[], int, short)
声明
public static void WriteTo(this byte[] bytes, int offset, short num)
参数
|
编辑本文
查看源代码
WriteTo(byte[], int, int)
声明
public static void WriteTo(this byte[] bytes, int offset, int num)
参数
|
编辑本文
查看源代码
WriteTo(byte[], int, ushort)
声明
public static void WriteTo(this byte[] bytes, int offset, ushort num)
参数
|
编辑本文
查看源代码
WriteTo(byte[], int, uint)
声明
public static void WriteTo(this byte[] bytes, int offset, uint num)
参数