|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Objectcom.caucho.burlap.client.MicroBurlapInput
public class MicroBurlapInput
Input stream for Burlap requests, compatible with microedition Java. It only uses classes and types available to J2ME. In particular, it does not have any support for the <double> type.
MicroBurlapInput does not depend on any classes other than in J2ME, so it can be extracted independently into a smaller package.
MicroBurlapInput is unbuffered, so any client needs to provide its own buffering.
InputStream is = ...; // from http connection MicroBurlapInput in = new MicroBurlapInput(is); String value; in.startReply(); // read reply header value = in.readString(); // read string value in.completeReply(); // read reply footer
构造方法摘要 | |
---|---|
MicroBurlapInput()
Creates an uninitialized Burlap input stream. |
|
MicroBurlapInput(java.io.InputStream is)
Creates a new Burlap input stream, initialized with an underlying input stream. |
方法摘要 | |
---|---|
void |
completeCall()
Completes reading the call. |
void |
completeReply()
Completes reading the reply. |
java.lang.String |
getMethod()
Returns a call's method. |
void |
init(java.io.InputStream is)
Initialize the Burlap input stream with a new underlying stream. |
boolean |
readBoolean()
Reads a boolean value from the input stream. |
byte[] |
readBytes()
Reads a byte array from the input stream. |
java.util.Hashtable |
readFault()
Reads a fault. |
int |
readInt()
Reads an integer value from the input stream. |
int |
readLength()
Reads a length value from the input stream. |
java.lang.Object |
readList(java.lang.Class expectedClass,
java.lang.String type,
int length)
Reads a list object from the input stream. |
long |
readLocalDate()
Reads a date value from the input stream. |
long |
readLong()
Reads a long value from the input stream. |
java.lang.Object |
readMap(java.lang.Class expectedClass,
java.lang.String type)
Reads an object from the input stream. |
java.lang.Object |
readObject(java.lang.Class expectedClass)
Reads an arbitrary object the input stream. |
BurlapRemote |
readRemote()
Reads a remote value from the input stream. |
java.lang.Object |
readReply(java.lang.Class expectedClass)
Reads a reply as an object. |
java.lang.String |
readString()
Reads a string value from the input stream. |
java.lang.String |
readType()
Reads a type value from the input stream. |
long |
readUTCDate()
Reads a date value from the input stream. |
java.lang.Object |
resolveRemote(java.lang.String type,
java.lang.String url)
Resolves a remote object. |
void |
startCall()
Starts reading the call A successful completion will have a single value: <burlap:call> <method>method</method> |
boolean |
startReply()
Starts reading the reply. |
从类 java.lang.Object 继承的方法 |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
构造方法详细信息 |
---|
public MicroBurlapInput(java.io.InputStream is)
is
- the underlying input stream.public MicroBurlapInput()
方法详细信息 |
---|
public java.lang.String getMethod()
public void init(java.io.InputStream is)
init(InputStream)
to reuse
MicroBurlapInput to save garbage collection.
public void startCall() throws java.io.IOException
A successful completion will have a single value:
<burlap:call> <method>method</method>
java.io.IOException
public void completeCall() throws java.io.IOException
</burlap:call>
java.io.IOException
public java.lang.Object readReply(java.lang.Class expectedClass) throws java.lang.Exception
java.lang.Exception
public boolean startReply() throws java.io.IOException
A successful completion will have a single value. An unsuccessful one will have a fault:
<burlap:reply>
java.io.IOException
public void completeReply() throws java.io.IOException
</burlap:reply>
java.io.IOException
public boolean readBoolean() throws java.io.IOException
java.io.IOException
public int readInt() throws java.io.IOException
java.io.IOException
public long readLong() throws java.io.IOException
java.io.IOException
public long readUTCDate() throws java.io.IOException
java.io.IOException
public long readLocalDate() throws java.io.IOException
java.io.IOException
public BurlapRemote readRemote() throws java.io.IOException
java.io.IOException
public java.lang.String readString() throws java.io.IOException
The two valid possibilities are either a <null> or a <string>. The string value is encoded in utf-8, and understands the basic XML escapes: "&123;", "<", ">", "'", """.
<null></null> <string>a utf-8 encoded string</string>
java.io.IOException
public byte[] readBytes() throws java.io.IOException
The two valid possibilities are either a <null> or a <base64>.
java.io.IOException
public java.lang.Object readObject(java.lang.Class expectedClass) throws java.io.IOException
java.io.IOException
public java.lang.String readType() throws java.io.IOException
<type>a utf-8 encoded string</type>
java.io.IOException
public int readLength() throws java.io.IOException
<length>integer</length>
java.io.IOException
public java.lang.Object resolveRemote(java.lang.String type, java.lang.String url) throws java.io.IOException
java.io.IOException
public java.util.Hashtable readFault() throws java.io.IOException
java.io.IOException
public java.lang.Object readMap(java.lang.Class expectedClass, java.lang.String type) throws java.io.IOException
expectedClass
- the calling routine's expected classtype
- the type from the stream
java.io.IOException
public java.lang.Object readList(java.lang.Class expectedClass, java.lang.String type, int length) throws java.io.IOException
expectedClass
- the calling routine's expected classtype
- the type from the streamlength
- the expected length, -1 for unspecified length
java.io.IOException
|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |