Package com.caucho.hessian.io

Examples of com.caucho.hessian.io.HessianOutput


    int minor = in.read();
    if (major >= 2) {
      out = new Hessian2Output(outputStream);
    }
    else {
      out = new HessianOutput(outputStream);
    }
    if (this.serializerFactory != null) {
      out.setSerializerFactory(this.serializerFactory);
    }
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 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

     */
    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

            // ***** Hessian 3.0.13 bug: the following line was missing.
            HessianInput in = new HessianInput();
            in.setSerializerFactory(getSerializerFactory());
            in.init(is);

            HessianOutput out = new HessianOutput();
            out.setSerializerFactory(getSerializerFactory());
            out.init(os);

            if (objectId != null)
                _objectSkeleton.invoke(in, out);
            else
                _homeSkeleton.invoke(in, out);
View Full Code Here

        int minor = hessianInput.read();
        if (major >= 2) {
                hessianOutput = new Hessian2Output(outputStream);
        }
        else {
                hessianOutput = new HessianOutput(outputStream);
        }
        if (this.serializerFactory != null) {
                hessianOutput.setSerializerFactory(this.serializerFactory);
        }
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 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);
      }
    }
    try {
      invokeMethod.invoke(this.skeleton, new Object[] {in, out});
    }
    finally {
      try {
        in.close();
        inputStream.close();
      }
      catch (IOException ex) {
      }
      try {
        out.close();
        outputStream.close();
      }
      catch (IOException ex) {
      }
    }
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.