public string ReadHex(int len) { var readOnlySpan = GetReadOnlySpan(len); string hex = HexUtil.DoHexDump(readOnlySpan, 0, len); return(hex); }
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); }
/// <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);
public static string ToHexString(this byte[] source) { return(HexUtil.DoHexDump(source, 0, source.Length).ToUpper()); }
/// <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);