Package com.caucho.hessian.io

Examples of com.caucho.hessian.io.HessianOutput


     *
     * @see de.netseeker.ejoe.adapter.SerializeAdapter#write(java.lang.Object, java.io.OutputStream)
     */
    public void write( Object obj, OutputStream out ) throws Exception
    {
        HessianOutput hOut = new HessianOutput( out );
        hOut.writeObject( obj );
    }
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

        int minor = in.read();

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

        out.setSerializerFactory(serializerFactory);

        if (objectId != null)
          _objectSkeleton.invoke(in, 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

   private final HessianOutput output;

   HessianCauchoOutput(OutputStream stream)
   {
      this.stream = stream;
      this.output = new HessianOutput();
      output.setSerializerFactory(new JMXSerializerFactory());
      output.init(stream);
   }
View Full Code Here

     */
    public static Object cloneViaClientServerSerialization(
            Serializable object,
            EntityResolver serverResolver) throws Exception {
        ByteArrayOutputStream bytes = new ByteArrayOutputStream();
        HessianOutput out = new HessianOutput(bytes);
        out.setSerializerFactory(HessianConfig.createFactory(
                HessianConnection.CLIENT_SERIALIZER_FACTORIES,
                null));
        out.writeObject(object);

        byte[] data = bytes.toByteArray();

        HessianInput in = new HessianInput(new ByteArrayInputStream(data));
        in.setSerializerFactory(HessianConfig.createFactory(
View Full Code Here

    public static Object cloneViaServerClientSerialization(
            Serializable object,
            EntityResolver serverResolver) throws Exception {
        ByteArrayOutputStream bytes = new ByteArrayOutputStream();
        HessianOutput out = new HessianOutput(bytes);
        out.setSerializerFactory(HessianConfig.createFactory(
                HessianService.SERVER_SERIALIZER_FACTORIES,
                serverResolver));
        out.writeObject(object);

        byte[] data = bytes.toByteArray();

        HessianInput in = new HessianInput(new ByteArrayInputStream(data));
        in.setSerializerFactory(HessianConfig.createFactory(
View Full Code Here

            int minor = in.read();

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

            out.setSerializerFactory(serializerFactory);

            invoke(in, out);
View Full Code Here

    }
  }

  public void invoke(InputStream inputStream, OutputStream outputStream) throws Throwable {
    HessianInput in = new HessianInput(inputStream);
    HessianOutput out = new HessianOutput(outputStream);
    if (this.serializerFactory != null) {
      in.setSerializerFactory(this.serializerFactory);
      if (applySerializerFactoryToOutput) {
        out.setSerializerFactory(this.serializerFactory);
      }
    }
    invokeMethod.invoke(this.skeleton, new Object[] {in, out});
  }
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.