コード例 #1
0
        public string ReadHex(int len)
        {
            var    readOnlySpan = GetReadOnlySpan(len);
            string hex          = HexUtil.DoHexDump(readOnlySpan, 0, len);

            return(hex);
        }
コード例 #2
0
        public static string ReadHexStringLittle(ReadOnlySpan <byte> read, ref int offset, int len)
        {
            ReadOnlySpan <byte> source = read.Slice(offset, len);
            string hex = HexUtil.DoHexDump(read, offset, len);

            offset += len;
            return(hex);
        }
コード例 #3
0
 /// <summary>
 ///     Returns a <a href="http://en.wikipedia.org/wiki/Hex_dump">hex dump</a>
 ///     of the specified buffer's sub-region.
 /// </summary>
 public static string HexDump(byte[] array, int fromIndex, int length) => HexUtil.DoHexDump(array, fromIndex, length);
コード例 #4
0
 public static string ToHexString(this byte[] source)
 {
     return(HexUtil.DoHexDump(source, 0, source.Length).ToUpper());
 }
コード例 #5
0
 /// <summary>
 ///     Returns a <a href="http://en.wikipedia.org/wiki/Hex_dump">hex dump</a>
 ///     of the specified buffer's sub-region.
 /// </summary>
 public static string HexDump(IByteBuffer buffer, int fromIndex, int length) => HexUtil.DoHexDump(buffer, fromIndex, length);