diff --git a/src/main/resources/vertx/buffer.js b/src/main/resources/vertx/buffer.js index 98f98ce..580fdfc 100644 --- a/src/main/resources/vertx/buffer.js +++ b/src/main/resources/vertx/buffer.js @@ -84,6 +84,15 @@ var Buffer = function(obj) { return __jbuf.getByte(pos); }; + /** + * Get a copy of the buffer as a byte array. + * + * @returns {array} + */ + this.getBytes = function() { + return __jbuf.getBytes(); + }; + /** * Get a signed 32 bit integer from the buffer. *