+
+ function Uint8ArrayNode(array)
+ {
+ var table = document.createElement('table');
+ var width = 16;
+ for (var offset = 0; offset <= array.length; offset += width) {
+ var tr = document.createElement('tr');
+ table.appendChild(tr);
+
+ var th = document.createElement('th');
+ tr.appendChild(th);
+ th.innerText = ('0000000' + offset.toString(16)).substr(-8) + ':';
+
+ for (var column = 0; column < width && offset + column < array.length; column += 2) {
+ var td = document.createElement('td');
+ tr.appendChild(td);
+ td.innerText = ('00' + array[offset + column].toString(16)).substr(-2);
+ if (offset + column + 1 < array.length)
+ td.innerText += ('00' + array[offset + column + 1].toString(16)).substr(-2);
+ }
+ }
+ return table;
+ }