Package com.caucho.hessian.io

Examples of com.caucho.hessian.io.HessianInput


                serverResolver));
        out.writeObject(object);

        byte[] data = bytes.toByteArray();

        HessianInput in = new HessianInput(new ByteArrayInputStream(data));
        in.setSerializerFactory(HessianConfig.createFactory(
                HessianConnection.CLIENT_SERIALIZER_FACTORIES,
                null));
        return in.readObject();
    }
View Full Code Here


        try {
            InputStream is = request.getInputStream();
            OutputStream os = response.getOutputStream();

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

View Full Code Here

      throw new IllegalStateException("Hessian 1 (version 3.0.19-) not present");
    }
  }

  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 {
View Full Code Here

      }
      else if (code == 'c') {
        // Hessian 1.0 call
        major = isToUse.read();
        minor = isToUse.read();
        in = new HessianInput(isToUse);
        if (major >= 2) {
          out = new Hessian2Output(osToUse);
        }
        else {
          out = new HessianOutput(osToUse);
View Full Code Here

      }
      else if (code == 'c') {
        // Hessian 1.0 call
        major = isToUse.read();
        minor = isToUse.read();
        in = new HessianInput(isToUse);
        if (major >= 2) {
          out = new Hessian2Output(osToUse);
        }
        else {
          out = new HessianOutput(osToUse);
View Full Code Here

        hessionOutput.writeObject(data);
        hessionOutput.close();
    }

    public Object deserialize(Class clazz, InputStream inputStream) throws IOException {
        HessianInput hession2Input = new HessianInput(inputStream);

        Object result = hession2Input.readObject();
        hession2Input.close();
        return result;
    }
View Full Code Here

    AbstractHessianInput in;

    if (_isDebug)
      is = new HessianDebugInputStream(is, new PrintWriter(System.out));

    in = new HessianInput(is);

    in.setRemoteResolver(getRemoteResolver());

    in.setSerializerFactory(getSerializerFactory());
View Full Code Here

  }

  protected Object readResponse(InputStream in)
    throws IOException, RestException
  {
    HessianInput hessianIn = new HessianInput(in);

    return hessianIn.readObject(null);
  }
View Full Code Here

  }
 
  protected Object readPostData(InputStream in)
    throws IOException, RestException
  {
    HessianInput hessianIn = new HessianInput(in);

    return hessianIn.readObject(null);
  }
View Full Code Here

    }
    //
    public Object decode(byte[] bytes) throws IOException {
        ClassLoader tccl = Thread.currentThread().getContextClassLoader();
        Thread.currentThread().setContextClassLoader(Hessian_DecoderEncoder.class.getClassLoader());
        HessianInput input = new HessianInput(new ByteArrayInputStream(bytes));
        input.setSerializerFactory(this.serializerFactory);
        Object resultObject = input.readObject();
        Thread.currentThread().setContextClassLoader(tccl);
        return resultObject;
    }
View Full Code Here

TOP

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

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.