Package com.caucho.hessian.io

Examples of com.caucho.hessian.io.HessianOutput


        in = new HessianInput(isToUse);
        if (major >= 2) {
          out = new Hessian2Output(osToUse);
        }
        else {
          out = new HessianOutput(osToUse);
        }
      }
      else {
        throw new IOException("Expected 'H'/'C' (Hessian 2.0) or 'c' (Hessian 1.0) in hessian input at " + code);
      }
View Full Code Here


        in = new HessianInput(isToUse);
        if (major >= 2) {
          out = new Hessian2Output(osToUse);
        }
        else {
          out = new HessianOutput(osToUse);
        }
      }
      else {
        throw new IOException("Expected 'H'/'C' (Hessian 2.0) or 'c' (Hessian 1.0) in hessian input at " + code);
      }
View Full Code Here

    int minor = in.read();
    if (major >= 2) {
      out = new Hessian2Output(osToUse);
    }
    else {
      out = new HessianOutput(osToUse);
    }
    if (this.serializerFactory != null) {
      out.setSerializerFactory(this.serializerFactory);
    }
View Full Code Here

    public String getName() {
        return "Hessian";
    }

    public void serialize(Object data, OutputStream outputStream) throws IOException {
        HessianOutput hessionOutput = new HessianOutput(outputStream);

        hessionOutput.writeObject(data);
        hessionOutput.close();
    }
View Full Code Here

    AbstractHessianOutput out;

    if (_isHessian2Request)
      out = new Hessian2Output(os);
    else {
      HessianOutput out1 = new HessianOutput(os);
      out = out1;

      if (_isHessian2Reply)
        out1.setVersion(2);
    }

    out.setSerializerFactory(getSerializerFactory());

    return out;
View Full Code Here

  }

  protected void writePostData(OutputStream out, ArrayList<Object> postValues)
    throws IOException, RestException
  {
    HessianOutput hessianOut = new HessianOutput(out);

    for (Object postValue : postValues)
      hessianOut.writeObject(postValue);
  }
View Full Code Here

  }

  protected void writeResponse(OutputStream out, Object result)
    throws IOException, RestException
  {
    HessianOutput hessianOut = new HessianOutput(out);

    hessianOut.writeObject(result);
  }
View Full Code Here

      int minor = in.read();

      if (major >= 2)
        out = new Hessian2Output(os);
      else
        out = new HessianOutput(os);

      out.setSerializerFactory(serializerFactory);

      if (_skeleton == null)
        throw new Exception("skeleton is null!");
View Full Code Here

        this.serializerFactory = new SerializerFactory(loader);
    }
    //
    public byte[] encode(Object object) throws IOException {
        ByteArrayOutputStream binary = new ByteArrayOutputStream();
        HessianOutput hout = new HessianOutput(binary);
        hout.setSerializerFactory(this.serializerFactory);
        hout.writeObject(object);
        return binary.toByteArray();
    }
View Full Code Here

     * @see com.taobao.notify.codec.Serializer#encodeObject(Object)
     */
    @Override
    public byte[] encodeObject(final Object obj) throws IOException {
        ByteArrayOutputStream baos = null;
        HessianOutput output = null;
        try {
            baos = new ByteArrayOutputStream(1024);
            output = new HessianOutput(baos);
            output.startCall();
            output.writeObject(obj);
            output.completeCall();
        }
        catch (final IOException ex) {
            throw ex;
        }
        finally {
View Full Code Here

TOP

Related Classes of com.caucho.hessian.io.HessianOutput

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.