Use Uint8Array instead of byte array (from websocket branch).
diff --git a/js/encoding/BinaryXMLDecoder.js b/js/encoding/BinaryXMLDecoder.js
index 0c88e0f..53343f4 100644
--- a/js/encoding/BinaryXMLDecoder.js
+++ b/js/encoding/BinaryXMLDecoder.js
@@ -537,12 +537,11 @@
};
-//byte[]
+//Uint8Array
BinaryXMLDecoder.prototype.decodeBlob = function(
//int
blobLength) {
-
if(null == blobLength){
//TypeAndVal
tv = this.decodeTypeAndVal();
@@ -560,12 +559,10 @@
}
//
- //byte []
-
- var bytes = this.istream.slice(this.offset, this.offset+ blobLength);
+ //Uint8Array
+ var bytes = this.istream.subarray(this.offset, this.offset+ blobLength);
this.offset += blobLength;
- //int
return bytes;
};
@@ -679,9 +676,6 @@
TypeAndVal.prototype.val = function(){
return this.v;
};
-//TODO
-
-
@@ -713,13 +707,14 @@
return strElementText;
};
+
/*
* Set the offset into the input, used for the next read.
*/
BinaryXMLDecoder.prototype.seek = function(
//int
offset) {
- this.offset = offset;
+ this.offset = offset;
}
/*
@@ -734,4 +729,3 @@
ContentDecodingException.prototype = new Error();
ContentDecodingException.prototype.name = "ContentDecodingException";
-