com.caucho.json
Class JsonOutput
java.lang.Object
com.caucho.json.JsonOutput
public class JsonOutput
- extends java.lang.Object
Abstract output stream for JSON requests.
OutputStream os = ...; // from http connection
AbstractOutput out = new HessianSerializerOutput(os);
String value;
out.startCall("hello"); // start hello call
out.writeString("arg1"); // write a string argument
out.completeCall(); // complete the call
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JsonOutput
public JsonOutput()
JsonOutput
public JsonOutput(java.io.PrintWriter os)
JsonOutput
public JsonOutput(WriteStream out)
init
public void init(java.io.PrintWriter os)
- Initialize the output with a new underlying stream.
writeObject
public void writeObject(java.lang.Object value)
throws java.io.IOException
- Throws:
java.io.IOException
writeObject
public void writeObject(java.lang.Object value,
boolean annotated)
throws java.io.IOException
- Throws:
java.io.IOException
writeNull
public void writeNull()
throws java.io.IOException
- Throws:
java.io.IOException
writeBoolean
public void writeBoolean(boolean value)
throws java.io.IOException
- Throws:
java.io.IOException
writeLong
public void writeLong(long value)
throws java.io.IOException
- Throws:
java.io.IOException
writeDouble
public void writeDouble(double value)
throws java.io.IOException
- Throws:
java.io.IOException
writeString
public void writeString(java.lang.String v)
throws java.io.IOException
- Throws:
java.io.IOException
writeString
public void writeString(char[] v,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
writeArrayBegin
public void writeArrayBegin()
throws java.io.IOException
- Throws:
java.io.IOException
writeArrayComma
public void writeArrayComma()
throws java.io.IOException
- Throws:
java.io.IOException
writeArrayEnd
public void writeArrayEnd()
throws java.io.IOException
- Throws:
java.io.IOException
writeMapBegin
public void writeMapBegin()
throws java.io.IOException
- Throws:
java.io.IOException
writeMapComma
public void writeMapComma()
throws java.io.IOException
- Throws:
java.io.IOException
writeMapEntry
public void writeMapEntry(java.lang.String key,
java.lang.Object value)
throws java.io.IOException
- Throws:
java.io.IOException
writeMapEntry
public void writeMapEntry(java.lang.String key,
java.lang.Object value,
boolean annotated)
throws java.io.IOException
- Throws:
java.io.IOException
writeMapEnd
public void writeMapEnd()
throws java.io.IOException
- Throws:
java.io.IOException
flushBuffer
public void flushBuffer()
throws java.io.IOException
- Throws:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException