数组至16进制快速转换()

数组至16进制快速转换(高手进)
我们通常将数组byte()用以下方法转换成16进制字符串:
VB.NET code
Private Function BytesToHex(bytB() As Byte) As String
    Dim strTmp As String, i As Long
    For i = 1 To UBound(bytB)
        strTmp = strTmp & " " & Hex(bytB(i))
        DoEvents
    Next
    BytesToHex = strTmp
End Function


这个方法简单,但如果数据量大,转换过程则非常的漫长。1兆的文件,可能要十几分钟。
是否有更快速的方法?

------解决方案--------------------
这种大量处理字符串的方式最好不要用String类型,使用StringBuilter为好.
Dim strTmp As String改成 Dim strTmp As New StringBuilter(初始化大小)