org.boris.xlloop.http
Class JSONCodec

java.lang.Object
  extended by org.boris.xlloop.http.JSONCodec

public class JSONCodec
extends java.lang.Object


Constructor Summary
JSONCodec()
           
 
Method Summary
static FunctionRequest decodeRequest(java.io.Reader r)
           
static XLoper decodeXLoper(java.io.Reader r)
           
static void doRequest(IFunctionHandler handler, java.io.Reader input, java.io.Writer output)
           
static JSONObject encode(XLoper x)
           
static JSONObject encodeRequest(FunctionRequest fr)
           
static void encodeRequest(FunctionRequest fr, java.io.Writer w)
           
static void encodeXLoper(XLoper x, java.io.Writer w)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONCodec

public JSONCodec()
Method Detail

doRequest

public static void doRequest(IFunctionHandler handler,
                             java.io.Reader input,
                             java.io.Writer output)
                      throws java.io.IOException,
                             JSONException
Throws:
java.io.IOException
JSONException

decodeRequest

public static FunctionRequest decodeRequest(java.io.Reader r)
                                     throws java.io.IOException,
                                            JSONException
Throws:
java.io.IOException
JSONException

decodeXLoper

public static XLoper decodeXLoper(java.io.Reader r)
                           throws java.io.IOException,
                                  JSONException
Throws:
java.io.IOException
JSONException

encodeRequest

public static void encodeRequest(FunctionRequest fr,
                                 java.io.Writer w)
                          throws java.io.IOException,
                                 JSONException
Throws:
java.io.IOException
JSONException

encodeRequest

public static JSONObject encodeRequest(FunctionRequest fr)
                                throws java.io.IOException,
                                       JSONException
Throws:
java.io.IOException
JSONException

encodeXLoper

public static void encodeXLoper(XLoper x,
                                java.io.Writer w)
                         throws java.io.IOException,
                                JSONException
Throws:
java.io.IOException
JSONException

encode

public static JSONObject encode(XLoper x)
                         throws JSONException
Throws:
JSONException