类 HessianSerializerInput


  • public class HessianSerializerInput
    extends HessianInput
    Input stream for Hessian requests, deserializing objects using the java.io.Serialization protocol.

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

    Serialization

     InputStream is = new FileInputStream("test.xml");
     HessianOutput in = new HessianSerializerOutput(is);
    
     Object obj = in.readObject();
     is.close();
     

    Parsing a Hessian reply

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

      • HessianSerializerInput

        public HessianSerializerInput(InputStream is)
        Creates a new Hessian input stream, initialized with an underlying input stream.
        参数:
        is - the underlying input stream.
      • HessianSerializerInput

        public HessianSerializerInput()
        Creates an uninitialized Hessian input stream.