|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Objectcom.caucho.hessian.io.AbstractHessianOutput
com.caucho.burlap.io.AbstractBurlapOutput
com.caucho.burlap.io.BurlapOutput
public class BurlapOutput
Output stream for Burlap requests, compatible with microedition Java. It only uses classes and types available in JDK.
Since BurlapOutput does not depend on any classes other than in the JDK, it can be extracted independently into a smaller package.
BurlapOutput is unbuffered, so any client needs to provide its own buffering.
OutputStream os = ...; // from http connection BurlapOutput out = new BurlapOutput(os); String value; out.startCall("hello"); // start hello call out.writeString("arg1"); // write a string argument out.completeCall(); // complete the call
构造方法摘要 | |
---|---|
BurlapOutput()
Creates an uninitialized Burlap output stream. |
|
BurlapOutput(java.io.OutputStream os)
Creates a new Burlap output stream, initialized with an underlying output stream. |
方法摘要 | |
---|---|
boolean |
addRef(java.lang.Object object)
If the object has already been written, just write its ref. |
void |
call(java.lang.String method,
java.lang.Object[] args)
Writes a complete method call. |
void |
completeCall()
Completes. |
void |
completeReply()
Completes reading the reply A successful completion will have a single value: </burlap:reply> |
int |
getRef(java.lang.Object obj)
|
void |
init(java.io.OutputStream os)
Initializes the output |
void |
printDate(java.util.Calendar calendar)
Prints a date. |
void |
printString(char[] v,
int offset,
int length)
Prints a string to the stream, encoded as UTF-8 |
void |
printString(java.lang.String v)
Prints a string to the stream, encoded as UTF-8 |
void |
printString(java.lang.String v,
int offset,
int length)
Prints a string to the stream, encoded as UTF-8 |
boolean |
removeRef(java.lang.Object obj)
Removes a reference. |
boolean |
replaceRef(java.lang.Object oldRef,
java.lang.Object newRef)
Replaces a reference from one object to another. |
void |
startCall()
Starts the method call. |
void |
startCall(java.lang.String method)
Starts the method call. |
void |
startReply()
Starts the reply A successful completion will have a single value: r |
void |
writeBoolean(boolean value)
Writes a boolean value to the stream. |
void |
writeByteBufferEnd(byte[] buffer,
int offset,
int length)
Writes a byte buffer to the stream. |
void |
writeByteBufferPart(byte[] buffer,
int offset,
int length)
Writes a byte buffer to the stream. |
void |
writeByteBufferStart()
Writes a byte buffer to the stream. |
void |
writeBytes(byte[] buffer)
Writes a byte array to the stream. |
void |
writeBytes(byte[] buffer,
int offset,
int length)
Writes a byte array to the stream. |
void |
writeDouble(double value)
Writes a double value to the stream. |
void |
writeFault(java.lang.String code,
java.lang.String message,
java.lang.Object detail)
Writes a fault. |
void |
writeHeader(java.lang.String name)
Writes a header name. |
void |
writeInt(int value)
Writes an integer value to the stream. |
boolean |
writeListBegin(int length,
java.lang.String type)
Writes the list header to the stream. |
void |
writeListEnd()
Writes the tail of the list to the stream. |
void |
writeLong(long value)
Writes a long value to the stream. |
void |
writeMapBegin(java.lang.String type)
Writes the map header to the stream. |
void |
writeMapEnd()
Writes the tail of the map to the stream. |
void |
writeMethod(java.lang.String method)
Writes the method for a call. |
void |
writeNull()
Writes a null value to the stream. |
void |
writeObject(java.lang.Object object)
Writes any object to the output stream. |
void |
writeRef(int value)
Writes a reference. |
void |
writeRemote(java.lang.String type,
java.lang.String url)
Writes a remote object reference to the stream. |
void |
writeString(char[] buffer,
int offset,
int length)
Writes a string value to the stream using UTF-8 encoding. |
void |
writeString(java.lang.String value)
Writes a string value to the stream using UTF-8 encoding. |
void |
writeUTCDate(long time)
Writes a date to the stream. |
从类 com.caucho.burlap.io.AbstractBurlapOutput 继承的方法 |
---|
startCall |
从类 com.caucho.hessian.io.AbstractHessianOutput 继承的方法 |
---|
close, flush, getSerializerFactory, resetReferences, setSerializerFactory, setUnshared, writeByteStream, writeClassFieldLength, writeObjectBegin, writeObjectEnd, writeReply |
从类 java.lang.Object 继承的方法 |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
构造方法详细信息 |
---|
public BurlapOutput(java.io.OutputStream os)
os
- the underlying output stream.public BurlapOutput()
方法详细信息 |
---|
public void init(java.io.OutputStream os)
AbstractHessianOutput
中的 init
public void call(java.lang.String method, java.lang.Object[] args) throws java.io.IOException
AbstractHessianOutput
中的 call
java.io.IOException
public void startCall(java.lang.String method) throws java.io.IOException
startCall
instead of call
if they wanted finer control over
writing the arguments, or needed to write headers.
<burlap:call>
<method>method-name</method>
method
- the method name to call.
java.io.IOException
public void startCall() throws java.io.IOException
startCall
instead of call
if they wanted finer control over
writing the arguments, or needed to write headers.
<method>method-name</method>
AbstractHessianOutput
中的 startCall
method
- the method name to call.
java.io.IOException
public void writeMethod(java.lang.String method) throws java.io.IOException
<method>value</method>
AbstractHessianOutput
中的 writeMethod
method
- the method name to call.
java.io.IOException
public void completeCall() throws java.io.IOException
</burlap:call>
AbstractHessianOutput
中的 completeCall
java.io.IOException
public void startReply() throws java.io.IOException
A successful completion will have a single value:
r
AbstractHessianOutput
中的 startReply
java.io.IOException
public void completeReply() throws java.io.IOException
A successful completion will have a single value:
</burlap:reply>
AbstractHessianOutput
中的 completeReply
java.io.IOException
public void writeHeader(java.lang.String name) throws java.io.IOException
<header>foo</header><int>value</int>
AbstractHessianOutput
中的 writeHeader
java.io.IOException
public void writeFault(java.lang.String code, java.lang.String message, java.lang.Object detail) throws java.io.IOException
<fault>
<string>code
<string>the fault code
<string>message
<string>the fault mesage
<string>detail
<map>t\x00\xnnjavax.ejb.FinderException
...
</map>
</fault>
AbstractHessianOutput
中的 writeFault
code
- the fault code, a three digit
java.io.IOException
public void writeObject(java.lang.Object object) throws java.io.IOException
AbstractHessianOutput
中的 writeObject
java.io.IOException
public boolean 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>
AbstractHessianOutput
中的 writeListBegin
java.io.IOException
public void writeListEnd() throws java.io.IOException
AbstractHessianOutput
中的 writeListEnd
java.io.IOException
public void writeMapBegin(java.lang.String type) throws java.io.IOException
writeMapBegin
followed by the map contents and then
call writeMapEnd
.
<map>
<type>type</type>
(<key> <value>)*
</map>
AbstractHessianOutput
中的 writeMapBegin
java.io.IOException
public void writeMapEnd() throws java.io.IOException
AbstractHessianOutput
中的 writeMapEnd
java.io.IOException
public void writeRemote(java.lang.String type, java.lang.String url) throws java.io.IOException
<remote>
<type>test.account.Account</type>
<string>http://caucho.com/foo;ejbid=bar</string>
</remote>
java.io.IOException
public void writeBoolean(boolean value) throws java.io.IOException
<boolean>0</boolean>
<boolean>1</boolean>
AbstractHessianOutput
中的 writeBoolean
value
- the boolean value to write.
java.io.IOException
public void writeInt(int value) throws java.io.IOException
<int>int value</int>
AbstractHessianOutput
中的 writeInt
value
- the integer value to write.
java.io.IOException
public void writeLong(long value) throws java.io.IOException
<long>int value</long>
AbstractHessianOutput
中的 writeLong
value
- the long value to write.
java.io.IOException
public void writeDouble(double value) throws java.io.IOException
<double>value</double>
AbstractHessianOutput
中的 writeDouble
value
- the double value to write.
java.io.IOException
public void writeUTCDate(long time) throws java.io.IOException
<date>iso8901</date>
AbstractHessianOutput
中的 writeUTCDate
time
- the date in milliseconds from the epoch in UTC
java.io.IOException
public void writeNull() throws java.io.IOException
<null></null>
AbstractHessianOutput
中的 writeNull
value
- the string value to write.
java.io.IOException
public void writeString(java.lang.String value) throws java.io.IOException
<string>string-value</string>
If the value is null, it will be written as
<null></null>
AbstractHessianOutput
中的 writeString
value
- the string value to write.
java.io.IOException
public 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
AbstractHessianOutput
中的 writeString
value
- the string value to write.
java.io.IOException
public void writeBytes(byte[] buffer) throws java.io.IOException
<base64>bytes</base64>
If the value is null, it will be written as
<null></null>
AbstractHessianOutput
中的 writeBytes
value
- the string value to write.
java.io.IOException
public void writeBytes(byte[] buffer, int offset, int length) throws java.io.IOException
<base64>bytes</base64>
If the value is null, it will be written as
<null></null>
AbstractHessianOutput
中的 writeBytes
value
- the string value to write.
java.io.IOException
public void writeByteBufferStart() throws java.io.IOException
AbstractHessianOutput
中的 writeByteBufferStart
java.io.IOException
public void writeByteBufferPart(byte[] buffer, int offset, int length) throws java.io.IOException
b b16 b18 bytes
AbstractHessianOutput
中的 writeByteBufferPart
java.io.IOException
public void writeByteBufferEnd(byte[] buffer, int offset, int length) throws java.io.IOException
b b16 b18 bytes
AbstractHessianOutput
中的 writeByteBufferEnd
java.io.IOException
public void writeRef(int value) throws java.io.IOException
<ref>int</ref>
value
- the integer value to write.
java.io.IOException
public boolean addRef(java.lang.Object object) throws java.io.IOException
AbstractHessianOutput
中的 addRef
object
- the object to add as a reference.
java.io.IOException
public int getRef(java.lang.Object obj)
AbstractHessianOutput
中的 getRef
public boolean removeRef(java.lang.Object obj) throws java.io.IOException
AbstractHessianOutput
中的 removeRef
java.io.IOException
public boolean replaceRef(java.lang.Object oldRef, java.lang.Object newRef) throws java.io.IOException
AbstractHessianOutput
中的 replaceRef
java.io.IOException
public void printString(java.lang.String v) throws java.io.IOException
v
- the string to print.
java.io.IOException
public void printString(java.lang.String v, int offset, int length) throws java.io.IOException
v
- the string to print.
java.io.IOException
public void printString(char[] v, int offset, int length) throws java.io.IOException
v
- the string to print.
java.io.IOException
public void printDate(java.util.Calendar calendar) throws java.io.IOException
date
- the date to print.
java.io.IOException
|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |