Class Index | File Index

Classes


Class Guacamole.JSONReader


Defined in: JSONReader.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
A reader which automatically handles the given input stream, assembling all received blobs into a JavaScript object by appending them to each other, in order, and decoding the result as JSON.
Method Summary
Method Attributes Method Name and Description
 
Returns the contents of this Guacamole.JSONReader as a JavaScript object.
 
Returns the current length of this Guacamole.JSONReader, in characters.
Event Summary
Event Attributes Event Name and Description
 
Fired once this stream is finished and no further data will be written.
 
onprogress(length)
Fired once for every blob of data received.
Class Detail
Guacamole.JSONReader(stream)
A reader which automatically handles the given input stream, assembling all received blobs into a JavaScript object by appending them to each other, in order, and decoding the result as JSON. Note that this object will overwrite any installed event handlers on the given Guacamole.InputStream.
Parameters:
{Guacamole.InputStream} stream
The stream that JSON will be read from.
Method Detail
{Object} getJSON()
Returns the contents of this Guacamole.JSONReader as a JavaScript object.
Returns:
{Object} The contents of this Guacamole.JSONReader, as parsed from the JSON contents of the input stream.

{Number} getLength()
Returns the current length of this Guacamole.JSONReader, in characters.
Returns:
{Number} The current length of this Guacamole.JSONReader.
Event Detail
onend()
Fired once this stream is finished and no further data will be written.

onprogress(length)
Fired once for every blob of data received.
Parameters:
{Number} length
The number of characters received.

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Sep 08 2015 22:31:29 GMT-0700 (PDT)