类 HessianInput

  • 直接已知子类:
    HessianSerializerInput

    public class HessianInput
    extends AbstractHessianInput
    Input stream for Hessian requests.

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

     InputStream is = ...; // from http connection
     HessianInput in = new HessianInput(is);
     String value;
    
     in.startReply();         // read reply header
     value = in.readString(); // read string value
     in.completeReply();      // read reply footer
     
    • 构造器详细资料

      • HessianInput

        public HessianInput()
        Creates an uninitialized Hessian input stream.
      • HessianInput

        public HessianInput​( is)
        Creates a new Hessian input stream, initialized with an underlying input stream.
        参数:
        is - the underlying input stream.
    • 方法详细资料

      • getSerializerFactory

        public SerializerFactory getSerializerFactory()
        Gets the serializer factory.
      • init

        public void init​( is)
        Initialize the hessian stream with the underlying input stream.
        覆盖:
        init 在类中 AbstractHessianInput
      • getReplyFault

        public  getReplyFault()
        Returns any reply fault.
      • readCall

        public int readCall()
                     throws 
        Starts reading the call

         c major minor
         
        指定者:
        readCall 在类中 AbstractHessianInput
        抛出:
      • readMethod

        public  readMethod()
                          throws 
        Starts reading the call

        A successful completion will have a single value:

         m b16 b8 method
         
        指定者:
        readMethod 在类中 AbstractHessianInput
        抛出:
      • startCall

        public void startCall()
                       throws 
        Starts reading the call, including the headers.

        The call expects the following protocol data

         c major minor
         m b16 b8 method
         
        指定者:
        startCall 在类中 AbstractHessianInput
        抛出:
      • completeCall

        public void completeCall()
                          throws 
        Completes reading the call

        A successful completion will have a single value:

         z
         
        指定者:
        completeCall 在类中 AbstractHessianInput
        抛出:
      • readReply

        public  readReply​( expectedClass)
                         throws 
        Reads a reply as an object. If the reply has a fault, throws the exception.
        指定者:
        readReply 在类中 AbstractHessianInput
        抛出:
      • startReply

        public void startReply()
                        throws 
        Starts reading the reply

        A successful completion will have a single value:

         r
         
        指定者:
        startReply 在类中 AbstractHessianInput
        抛出:
      • completeReply

        public void completeReply()
                           throws 
        Completes reading the call

        A successful completion will have a single value:

         z
         
        指定者:
        completeReply 在类中 AbstractHessianInput
        抛出:
      • completeValueReply

        public void completeValueReply()
                                throws 
        Completes reading the call

        A successful completion will have a single value:

         z
         
        抛出:
      • readHeader

        public  readHeader()
                          throws 
        Reads a header, returning null if there are no headers.

         H b16 b8 value
         
        指定者:
        readHeader 在类中 AbstractHessianInput
        抛出:
      • readShort

        public short readShort()
                        throws 
        Reads a short

         I b32 b24 b16 b8
         
        抛出:
      • readLong

        public long readLong()
                      throws 
        Reads a long

         L b64 b56 b48 b40 b32 b24 b16 b8
         
        指定者:
        readLong 在类中 AbstractHessianInput
        抛出:
      • readFloat

        public float readFloat()
                        throws 
        Reads a float

         D b64 b56 b48 b40 b32 b24 b16 b8
         
        抛出:
      • readDouble

        public double readDouble()
                          throws 
        Reads a double

         D b64 b56 b48 b40 b32 b24 b16 b8
         
        指定者:
        readDouble 在类中 AbstractHessianInput
        抛出:
      • readUTCDate

        public long readUTCDate()
                         throws 
        Reads a date.

         T b64 b56 b48 b40 b32 b24 b16 b8
         
        指定者:
        readUTCDate 在类中 AbstractHessianInput
        抛出:
      • readChar

        public int readChar()
                     throws 
        Reads a byte from the stream.
        抛出:
      • readString

        public int readString​(char[] buffer,
                              int offset,
                              int length)
                       throws 
        Reads a byte array from the stream.
        抛出:
      • readBytes

        public byte[] readBytes()
                         throws 
        Reads a byte array

         B b16 b8 data value
         
        指定者:
        readBytes 在类中 AbstractHessianInput
        抛出:
      • readByte

        public int readByte()
                     throws 
        Reads a byte from the stream.
        抛出:
      • readBytes

        public int readBytes​(byte[] buffer,
                             int offset,
                             int length)
                      throws 
        Reads a byte array from the stream.
        抛出:
      • readObject

        public  readObject​( cl)
                          throws 
        Reads an object from the input stream with an expected type.
        指定者:
        readObject 在类中 AbstractHessianInput
        参数:
        cl - the expected class if the protocol doesn't supply it.
        抛出:
      • readObject

        public  readObject​( expectedClass,
                                 <?>... expectedTypes)
                          throws 
        Reads an object from the input stream with an expected type.
        覆盖:
        readObject 在类中 AbstractHessianInput
        参数:
        expectedClass - the expected class if the protocol doesn't supply it.
        expectedTypes - the runtime type hints, eg: expectedClass equals Map, expectedTypes can equals String.class, Short.class
        抛出:
      • readObject

        public  readObject()
                          throws 
        Reads an arbitrary object from the input stream when the type is unknown.
        指定者:
        readObject 在类中 AbstractHessianInput
        抛出:
      • readObject

        public  readObject​(<<?>> expectedTypes)
                          throws 
        Reads an arbitrary object from the input stream when the type is unknown.
        覆盖:
        readObject 在类中 AbstractHessianInput
        参数:
        expectedTypes - the runtime type hints, eg: expectedTypes can equals String.class, Short.class for HashMap
        抛出:
      • isEnd

        public boolean isEnd()
                      throws 
        Returns true if this is the end of a list or a map.
        指定者:
        isEnd 在类中 AbstractHessianInput
        抛出:
      • resolveRemote

        public  resolveRemote​( type,
                                     url)
                             throws 
        Resolves a remote object.
        抛出:
      • readLength

        public int readLength()
                       throws 
        Parses the length for an array

         l b32 b24 b16 b8
         
        指定者:
        readLength 在类中 AbstractHessianInput
        抛出:
      • getReader

        public  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
         
        指定者:
        getReader 在类中 AbstractHessianInput