|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.hessian.io.AbstractHessianOutput
Abstract output stream for Hessian 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
Field Summary | |
protected SerializerFactory |
_serializerFactory
|
Constructor Summary | |
AbstractHessianOutput()
|
Method Summary | |
abstract boolean |
addRef(java.lang.Object object)
Adds an object to the reference list. |
abstract void |
completeCall()
Writes the method call:
|
abstract void |
init(java.io.OutputStream os)
Initialize the output with a new underlying stream. |
abstract boolean |
removeRef(java.lang.Object obj)
Removes a reference. |
abstract boolean |
replaceRef(java.lang.Object oldRef,
java.lang.Object newRef)
Replaces a reference from one object to another. |
void |
setSerializerFactory(SerializerFactory factory)
Sets the serializer factory. |
abstract void |
startCall(java.lang.String method)
Writes the method call:
|
abstract void |
writeBoolean(boolean value)
Writes a boolean value to the stream. |
abstract void |
writeByteBufferEnd(byte[] buffer,
int offset,
int length)
Writes the last chunk of a byte buffer to the stream. |
abstract void |
writeByteBufferPart(byte[] buffer,
int offset,
int length)
Writes a byte buffer to the stream. |
abstract void |
writeBytes(byte[] buffer)
Writes a byte array to the stream. |
abstract void |
writeBytes(byte[] buffer,
int offset,
int length)
Writes a byte array to the stream. |
abstract void |
writeDouble(double value)
Writes a double value to the stream. |
abstract void |
writeInt(int value)
Writes an integer value to the stream. |
abstract void |
writeListBegin(int length,
java.lang.String type)
Writes the list header to the stream. |
abstract void |
writeListEnd()
Writes the tail of the list to the stream. |
abstract void |
writeLong(long value)
Writes a long value to the stream. |
abstract void |
writeMapBegin(java.lang.String type)
Writes the map header to the stream. |
abstract void |
writeMapEnd()
Writes the tail of the map to the stream. |
abstract void |
writeNull()
Writes a null value to the stream. |
abstract void |
writeObject(java.lang.Object object)
Writes a generic object to the output stream. |
abstract void |
writeRef(int value)
Writes a reference. |
abstract void |
writeRemote(java.lang.String type,
java.lang.String url)
Writes a remote object reference to the stream. |
abstract void |
writeString(char[] buffer,
int offset,
int length)
Writes a string value to the stream using UTF-8 encoding. |
abstract void |
writeString(java.lang.String value)
Writes a string value to the stream using UTF-8 encoding. |
abstract void |
writeUTCDate(long time)
Writes a date to the stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected SerializerFactory _serializerFactory
Constructor Detail |
public AbstractHessianOutput()
Method Detail |
public void setSerializerFactory(SerializerFactory factory)
public abstract void init(java.io.OutputStream os)
public abstract void startCall(java.lang.String method) throws java.io.IOException
c major minor
m b16 b8 method-namek
method
- the method name to call.
java.io.IOException
public abstract void completeCall() throws java.io.IOException
z
java.io.IOException
public abstract void writeBoolean(boolean value) throws java.io.IOException
T
F
value
- the boolean value to write.
java.io.IOException
public abstract void writeInt(int value) throws java.io.IOException
I b32 b24 b16 b8
value
- the integer value to write.
java.io.IOException
public abstract void writeLong(long value) throws java.io.IOException
L b64 b56 b48 b40 b32 b24 b16 b8
value
- the long value to write.
java.io.IOException
public abstract void writeDouble(double value) throws java.io.IOException
D b64 b56 b48 b40 b32 b24 b16 b8
value
- the double value to write.
java.io.IOException
public abstract void writeUTCDate(long time) throws java.io.IOException
T b64 b56 b48 b40 b32 b24 b16 b8
time
- the date in milliseconds from the epoch in UTC
java.io.IOException
public abstract void writeNull() throws java.io.IOException
N
java.io.IOException
public abstract void writeString(java.lang.String value) throws java.io.IOException
S b16 b8 string-value
If the value is null, it will be written as
N
value
- the string value to write.
java.io.IOException
public abstract void writeString(char[] buffer, int offset, int length) throws java.io.IOException
S b16 b8 string-value
If the value is null, it will be written as
N
java.io.IOException
public abstract void writeBytes(byte[] buffer) throws java.io.IOException
B b16 b18 bytes
If the value is null, it will be written as
N
java.io.IOException
public abstract void writeBytes(byte[] buffer, int offset, int length) throws java.io.IOException
B b16 b18 bytes
If the value is null, it will be written as
N
java.io.IOException
public abstract void writeByteBufferPart(byte[] buffer, int offset, int length) throws java.io.IOException
b b16 b18 bytes
java.io.IOException
public abstract void writeByteBufferEnd(byte[] buffer, int offset, int length) throws java.io.IOException
b b16 b18 bytes
java.io.IOException
public abstract void writeRef(int value) throws java.io.IOException
R b32 b24 b16 b8
value
- the integer value to write.
java.io.IOException
public abstract boolean removeRef(java.lang.Object obj) throws java.io.IOException
java.io.IOException
public abstract boolean replaceRef(java.lang.Object oldRef, java.lang.Object newRef) throws java.io.IOException
java.io.IOException
public abstract boolean addRef(java.lang.Object object) throws java.io.IOException
R b32 b24 b16 b8
object
- the object to add as a reference.
java.io.IOException
public abstract void writeObject(java.lang.Object object) throws java.io.IOException
java.io.IOException
public abstract void writeListBegin(int length, java.lang.String type) throws java.io.IOException
writeListBegin
followed by the list contents and then
call writeListEnd
.
<list>
<type>java.util.ArrayList</type>
<length>3</length>
<int>1</int>
<int>2</int>
<int>3</int>
</list>
java.io.IOException
public abstract void writeListEnd() throws java.io.IOException
java.io.IOException
public abstract void writeMapBegin(java.lang.String type) throws java.io.IOException
writeMapBegin
followed by the map contents and then
call writeMapEnd
.
Mt b16 b8 type ( )z
java.io.IOException
public abstract void writeMapEnd() throws java.io.IOException
java.io.IOException
public abstract void writeRemote(java.lang.String type, java.lang.String url) throws java.io.IOException
'r' 't' b16 b8 type url
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |