com.caucho.burlap.io
类 BurlapInput

java.lang.Object
  继承者 com.caucho.hessian.io.AbstractHessianInput
      继承者 com.caucho.burlap.io.AbstractBurlapInput
          继承者 com.caucho.burlap.io.BurlapInput

public class BurlapInput
extends AbstractBurlapInput

Input stream for Burlap requests.

BurlapInput is unbuffered, so any client needs to provide its own buffering.

 InputStream is = ...; // from http connection
 BurlapInput in = new BurlapInput(is);
 String value;

 in.startReply();         // read reply header
 value = in.readString(); // read string value
 in.completeReply();      // read reply footer
 


字段摘要
static int TAG_BASE64
           
static int TAG_BASE64_END
           
static int TAG_BOOLEAN
           
static int TAG_BOOLEAN_END
           
static int TAG_CALL
           
static int TAG_CALL_END
           
static int TAG_DATE
           
static int TAG_DATE_END
           
static int TAG_DOUBLE
           
static int TAG_DOUBLE_END
           
static int TAG_EOF
           
static int TAG_FAULT
           
static int TAG_FAULT_END
           
static int TAG_HEADER
           
static int TAG_HEADER_END
           
static int TAG_INT
           
static int TAG_INT_END
           
static int TAG_LENGTH
           
static int TAG_LENGTH_END
           
static int TAG_LIST
           
static int TAG_LIST_END
           
static int TAG_LONG
           
static int TAG_LONG_END
           
static int TAG_MAP
           
static int TAG_MAP_END
           
static int TAG_METHOD
           
static int TAG_METHOD_END
           
static int TAG_NULL
           
static int TAG_NULL_END
           
static int TAG_REF
           
static int TAG_REF_END
           
static int TAG_REMOTE
           
static int TAG_REMOTE_END
           
static int TAG_REPLY
           
static int TAG_REPLY_END
           
static int TAG_STRING
           
static int TAG_STRING_END
           
static int TAG_TYPE
           
static int TAG_TYPE_END
           
static int TAG_XML
           
static int TAG_XML_END
           
 
构造方法摘要
BurlapInput()
          Creates an uninitialized Burlap input stream.
BurlapInput(java.io.InputStream is)
          Creates a new Burlap input stream, initialized with an underlying input stream.
 
方法摘要
 int addRef(java.lang.Object ref)
          Adds a list/map reference.
 void completeCall()
          Completes reading the call A successful completion will have a single value: </burlap:call>
 void completeReply()
          Completes reading the call A successful completion will have a single value: </burlap:reply>
 void expectTag(int expectTag)
           
 java.io.InputStream getInputStream()
           
 java.lang.String getMethod()
          Returns the calls method
 java.io.Reader getReader()
          Starts reading a string.
 java.lang.Throwable getReplyFault()
          Returns any reply fault.
 SerializerFactory getSerializerFactory()
          Gets the serializer factory.
 void init(java.io.InputStream is)
          Initialize the burlap stream with the underlying input stream.
 boolean isEnd()
          Returns true if this is the end of a list or a map.
 boolean readBoolean()
          Reads a boolean <boolean>0</boolean> <boolean>1</boolean>
 byte readByte()
          Reads a byte <int>value</int>
 byte[] readBytes()
          Reads a byte array <base64>...
 int readCall()
          Starts reading the call A successful completion will have a single value: <burlap:call>
 double readDouble()
          Reads a double <double>value</double>
 void readEnd()
          Reads the end byte.
 float readFloat()
          Reads a float <double>value</double>
 java.lang.String readHeader()
          Reads a header, returning null if there are no headers.
 java.io.InputStream readInputStream()
          Starts reading a byte array using an input stream.
 int readInt()
          Reads an integer <int>value</int>
 int readLength()
          Reads a length <length>value</length>
 void readListEnd()
          Reads the end of the map
 int readListStart()
          Reads the start of a list.
 long readLocalDate()
          Reads a date.
 long readLong()
          Reads a long <long>value</long>
 void readMapEnd()
          Reads the end of the map
 int readMapStart()
          Reads the start of a map.
 java.lang.String readMethod()
          Reads the method <method>method</method>
 org.w3c.dom.Node readNode()
          Reads an XML node.
 void readNull()
          Reads a null <null></null>
 java.lang.Object readObject()
          Reads an arbitrary object from the input stream when the type is unknown.
 java.lang.Object readObject(java.lang.Class cl)
          Reads an object from the input stream with an expected type.
 java.lang.Object readRef()
          Reads a reference.
 java.lang.Object readRemote()
          Reads a remote object.
 java.lang.Object readReply(java.lang.Class expectedClass)
          Reads a reply as an object.
 short readShort()
          Reads a short <int>value</int>
 java.lang.String readString()
          Reads a string <string>value</string>
 java.lang.String readType()
          Parses a type from the stream.
 long readUTCDate()
          Reads a date.
 java.lang.Object resolveRemote(java.lang.String type, java.lang.String url)
          Resolves a remote object.
 void setRef(int i, java.lang.Object ref)
          Adds a list/map reference.
 void setSerializerFactory(SerializerFactory factory)
          Sets the serializer factory.
 void startCall()
          Starts reading the call <burlap:call> <method>method</method>
 void startReply()
          Starts reading the reply A successful completion will have a single value: <burlap:reply> <value>
 
从类 com.caucho.hessian.io.AbstractHessianInput 继承的方法
close, getRemoteResolver, readMethodArgLength, readToOutputStream, resetReferences, setRemoteResolver, skipOptionalCall, startReplyBody
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

TAG_EOF

public static final int TAG_EOF
另请参见:
常量字段值

TAG_NULL

public static final int TAG_NULL
另请参见:
常量字段值

TAG_BOOLEAN

public static final int TAG_BOOLEAN
另请参见:
常量字段值

TAG_INT

public static final int TAG_INT
另请参见:
常量字段值

TAG_LONG

public static final int TAG_LONG
另请参见:
常量字段值

TAG_DOUBLE

public static final int TAG_DOUBLE
另请参见:
常量字段值

TAG_DATE

public static final int TAG_DATE
另请参见:
常量字段值

TAG_STRING

public static final int TAG_STRING
另请参见:
常量字段值

TAG_XML

public static final int TAG_XML
另请参见:
常量字段值

TAG_BASE64

public static final int TAG_BASE64
另请参见:
常量字段值

TAG_MAP

public static final int TAG_MAP
另请参见:
常量字段值

TAG_LIST

public static final int TAG_LIST
另请参见:
常量字段值

TAG_TYPE

public static final int TAG_TYPE
另请参见:
常量字段值

TAG_LENGTH

public static final int TAG_LENGTH
另请参见:
常量字段值

TAG_REF

public static final int TAG_REF
另请参见:
常量字段值

TAG_REMOTE

public static final int TAG_REMOTE
另请参见:
常量字段值

TAG_CALL

public static final int TAG_CALL
另请参见:
常量字段值

TAG_REPLY

public static final int TAG_REPLY
另请参见:
常量字段值

TAG_FAULT

public static final int TAG_FAULT
另请参见:
常量字段值

TAG_METHOD

public static final int TAG_METHOD
另请参见:
常量字段值

TAG_HEADER

public static final int TAG_HEADER
另请参见:
常量字段值

TAG_NULL_END

public static final int TAG_NULL_END
另请参见:
常量字段值

TAG_BOOLEAN_END

public static final int TAG_BOOLEAN_END
另请参见:
常量字段值

TAG_INT_END

public static final int TAG_INT_END
另请参见:
常量字段值

TAG_LONG_END

public static final int TAG_LONG_END
另请参见:
常量字段值

TAG_DOUBLE_END

public static final int TAG_DOUBLE_END
另请参见:
常量字段值

TAG_DATE_END

public static final int TAG_DATE_END
另请参见:
常量字段值

TAG_STRING_END

public static final int TAG_STRING_END
另请参见:
常量字段值

TAG_XML_END

public static final int TAG_XML_END
另请参见:
常量字段值

TAG_BASE64_END

public static final int TAG_BASE64_END
另请参见:
常量字段值

TAG_MAP_END

public static final int TAG_MAP_END
另请参见:
常量字段值

TAG_LIST_END

public static final int TAG_LIST_END
另请参见:
常量字段值

TAG_TYPE_END

public static final int TAG_TYPE_END
另请参见:
常量字段值

TAG_LENGTH_END

public static final int TAG_LENGTH_END
另请参见:
常量字段值

TAG_REF_END

public static final int TAG_REF_END
另请参见:
常量字段值

TAG_REMOTE_END

public static final int TAG_REMOTE_END
另请参见:
常量字段值

TAG_CALL_END

public static final int TAG_CALL_END
另请参见:
常量字段值

TAG_REPLY_END

public static final int TAG_REPLY_END
另请参见:
常量字段值

TAG_FAULT_END

public static final int TAG_FAULT_END
另请参见:
常量字段值

TAG_METHOD_END

public static final int TAG_METHOD_END
另请参见:
常量字段值

TAG_HEADER_END

public static final int TAG_HEADER_END
另请参见:
常量字段值
构造方法详细信息

BurlapInput

public BurlapInput()
Creates an uninitialized Burlap input stream.


BurlapInput

public BurlapInput(java.io.InputStream is)
Creates a new Burlap input stream, initialized with an underlying input stream.

参数:
is - the underlying input stream.
方法详细信息

setSerializerFactory

public void setSerializerFactory(SerializerFactory factory)
Sets the serializer factory.

覆盖:
AbstractHessianInput 中的 setSerializerFactory

getSerializerFactory

public SerializerFactory getSerializerFactory()
Gets the serializer factory.


init

public void init(java.io.InputStream is)
Initialize the burlap stream with the underlying input stream.

覆盖:
AbstractHessianInput 中的 init

getMethod

public java.lang.String getMethod()
Returns the calls method

指定者:
AbstractHessianInput 中的 getMethod

getReplyFault

public java.lang.Throwable getReplyFault()
Returns any reply fault.


startCall

public void startCall()
               throws java.io.IOException
Starts reading the call
 <burlap:call>
 <method>method</method>
 

指定者:
AbstractHessianInput 中的 startCall
抛出:
java.io.IOException

readCall

public int readCall()
             throws java.io.IOException
Starts reading the call

A successful completion will have a single value:

 <burlap:call>
 

指定者:
AbstractHessianInput 中的 readCall
抛出:
java.io.IOException

readMethod

public java.lang.String readMethod()
                            throws java.io.IOException
Reads the method
 <method>method</method>
 

指定者:
AbstractHessianInput 中的 readMethod
抛出:
java.io.IOException

completeCall

public void completeCall()
                  throws java.io.IOException
Completes reading the call

A successful completion will have a single value:

 </burlap:call>
 

指定者:
AbstractHessianInput 中的 completeCall
抛出:
java.io.IOException

readReply

public java.lang.Object readReply(java.lang.Class expectedClass)
                           throws java.lang.Throwable
Reads a reply as an object. If the reply has a fault, throws the exception.

指定者:
AbstractHessianInput 中的 readReply
抛出:
java.lang.Throwable

startReply

public void startReply()
                throws java.lang.Throwable
Starts reading the reply

A successful completion will have a single value:

 <burlap:reply>
 <value>
 

指定者:
AbstractHessianInput 中的 startReply
抛出:
java.lang.Throwable

completeReply

public void completeReply()
                   throws java.io.IOException
Completes reading the call

A successful completion will have a single value:

 </burlap:reply>
 

指定者:
AbstractHessianInput 中的 completeReply
抛出:
java.io.IOException

readHeader

public java.lang.String readHeader()
                            throws java.io.IOException
Reads a header, returning null if there are no headers.
 <header>value</header>
 

指定者:
AbstractHessianInput 中的 readHeader
抛出:
java.io.IOException

readNull

public void readNull()
              throws java.io.IOException
Reads a null
 <null></null>
 

指定者:
AbstractHessianInput 中的 readNull
抛出:
java.io.IOException

readBoolean

public boolean readBoolean()
                    throws java.io.IOException
Reads a boolean
 <boolean>0</boolean>
 <boolean>1</boolean>
 

指定者:
AbstractHessianInput 中的 readBoolean
抛出:
java.io.IOException

readByte

public byte readByte()
              throws java.io.IOException
Reads a byte
 <int>value</int>
 

抛出:
java.io.IOException

readShort

public short readShort()
                throws java.io.IOException
Reads a short
 <int>value</int>
 

抛出:
java.io.IOException

readInt

public int readInt()
            throws java.io.IOException
Reads an integer
 <int>value</int>
 

指定者:
AbstractHessianInput 中的 readInt
抛出:
java.io.IOException

readLong

public long readLong()
              throws java.io.IOException
Reads a long
 <long>value</long>
 

指定者:
AbstractHessianInput 中的 readLong
抛出:
java.io.IOException

readFloat

public float readFloat()
                throws java.io.IOException
Reads a float
 <double>value</double>
 

抛出:
java.io.IOException

readDouble

public double readDouble()
                  throws java.io.IOException
Reads a double
 <double>value</double>
 

指定者:
AbstractHessianInput 中的 readDouble
抛出:
java.io.IOException

readUTCDate

public long readUTCDate()
                 throws java.io.IOException
Reads a date.
 <date>ISO-8609 date</date>
 

指定者:
AbstractHessianInput 中的 readUTCDate
抛出:
java.io.IOException

readLocalDate

public long readLocalDate()
                   throws java.io.IOException
Reads a date.
 <date>ISO-8609 date</date>
 

抛出:
java.io.IOException

readString

public java.lang.String readString()
                            throws java.io.IOException
Reads a string
 <string>value</string>
 

指定者:
AbstractHessianInput 中的 readString
抛出:
java.io.IOException

readNode

public org.w3c.dom.Node readNode()
                          throws java.io.IOException
Reads an XML node.
 &xml;xml string</xml>
 

覆盖:
AbstractHessianInput 中的 readNode
抛出:
java.io.IOException

readBytes

public byte[] readBytes()
                 throws java.io.IOException
Reads a byte array
 <base64>...</base64>
 

指定者:
AbstractHessianInput 中的 readBytes
抛出:
java.io.IOException

readLength

public int readLength()
               throws java.io.IOException
Reads a length
 <length>value</length>
 

指定者:
AbstractHessianInput 中的 readLength
抛出:
java.io.IOException

readObject

public java.lang.Object readObject(java.lang.Class cl)
                            throws java.io.IOException
Reads an object from the input stream with an expected type.

指定者:
AbstractHessianInput 中的 readObject
参数:
cl - the expected class if the protocol doesn't supply it.
抛出:
java.io.IOException

readObject

public java.lang.Object readObject()
                            throws java.io.IOException
Reads an arbitrary object from the input stream when the type is unknown.

指定者:
AbstractHessianInput 中的 readObject
抛出:
java.io.IOException

readRemote

public java.lang.Object readRemote()
                            throws java.io.IOException
Reads a remote object.

指定者:
AbstractHessianInput 中的 readRemote
抛出:
java.io.IOException

readRef

public java.lang.Object readRef()
                         throws java.io.IOException
Reads a reference.

指定者:
AbstractHessianInput 中的 readRef
抛出:
java.io.IOException

readListStart

public int readListStart()
                  throws java.io.IOException
Reads the start of a list.

指定者:
AbstractHessianInput 中的 readListStart
抛出:
java.io.IOException

readMapStart

public int readMapStart()
                 throws java.io.IOException
Reads the start of a map.

指定者:
AbstractHessianInput 中的 readMapStart
抛出:
java.io.IOException

isEnd

public boolean isEnd()
              throws java.io.IOException
Returns true if this is the end of a list or a map.

指定者:
AbstractHessianInput 中的 isEnd
抛出:
java.io.IOException

readEnd

public void readEnd()
             throws java.io.IOException
Reads the end byte.

指定者:
AbstractHessianInput 中的 readEnd
抛出:
java.io.IOException

readMapEnd

public void readMapEnd()
                throws java.io.IOException
Reads the end of the map

指定者:
AbstractHessianInput 中的 readMapEnd
抛出:
java.io.IOException

readListEnd

public void readListEnd()
                 throws java.io.IOException
Reads the end of the map

指定者:
AbstractHessianInput 中的 readListEnd
抛出:
java.io.IOException

addRef

public int addRef(java.lang.Object ref)
Adds a list/map reference.

指定者:
AbstractHessianInput 中的 addRef

setRef

public void setRef(int i,
                   java.lang.Object ref)
Adds a list/map reference.

指定者:
AbstractHessianInput 中的 setRef

resolveRemote

public java.lang.Object resolveRemote(java.lang.String type,
                                      java.lang.String url)
                               throws java.io.IOException
Resolves a remote object.

抛出:
java.io.IOException

readType

public java.lang.String readType()
                          throws java.io.IOException
Parses a type from the stream.
 <type>type</type>
 

指定者:
AbstractHessianInput 中的 readType
抛出:
java.io.IOException

expectTag

public void expectTag(int expectTag)
               throws java.io.IOException
抛出:
java.io.IOException

getReader

public java.io.Reader getReader()
从类 AbstractHessianInput 复制的描述
Starts reading a string. All the characters must be read before calling the next method. The actual characters will be read with the reader's read() or read(char [], int, int).
 s b16 b8 non-final string chunk
 S b16 b8 final string chunk
 

指定者:
AbstractHessianInput 中的 getReader

readInputStream

public java.io.InputStream readInputStream()
从类 AbstractHessianInput 复制的描述
Starts reading a byte array using an input stream. All the bytes must be read before calling the following method.
 b b16 b8 non-final binary chunk
 B b16 b8 final binary chunk
 

指定者:
AbstractHessianInput 中的 readInputStream

getInputStream

public java.io.InputStream getInputStream()