Examples of Hessian2Input


Examples of com.caucho.hessian.io.Hessian2Input

    throws IOException
  {
    if (log.isLoggable(Level.FINEST))
      is = new HessianDebugInputStream(is, log, Level.FINEST);

    Hessian2Input hIn = new Hessian2Input(is);

    Object value = hIn.readObject();

    hIn.close();
   
    return value;
  }
View Full Code Here

Examples of com.caucho.hessian.io.Hessian2Input

      throw new IOException(L.l("expected 'H' for Hessian 2 at '{0}'", String.valueOf((char) ch)));

    is.read();
    is.read();

    Hessian2Input in = new Hessian2Input(is);
    Hessian2Output out = new Hessian2Output(os);

    in.startCall();

    String method = in.getMethod();
    Object []args = in.readArguments();
    in.completeCall();

    try {
      if (method.equals("lookup") ||
          method.equals("lookup_string") ||
          method.equals("lookup_1"))
View Full Code Here

Examples of com.caucho.hessian.io.Hessian2Input

      Cipher cipher = initCipher(cookie, Cipher.DECRYPT_MODE);

      ByteArrayInputStream is = new ByteArrayInputStream(encData);
      CipherInputStream cIn = new CipherInputStream(is, cipher);

      Hessian2Input in = new Hessian2Input(cIn);

      Object obj = in.readObject();

      if (! (obj instanceof SelfEncryptedCookie))
        throw new SecurityException(L.l("SelfEncryptedCookie[] is invalid because it does not correctly decrypt"));

      SelfEncryptedCookie cookieObj = (SelfEncryptedCookie) obj;

      in.close();
      cIn.close();
      is.close();

      return cookieObj;
    } catch (SecurityException e) {
View Full Code Here

Examples of com.caucho.hessian.io.Hessian2Input

     
      if (certPath.canRead()) {
        ReadStream is = certPath.openRead();
       
        try {
          Hessian2Input hIn = new Hessian2Input(is);
         
          cert = (SelfSignedCert) hIn.readObject(SelfSignedCert.class);
         
          hIn.close();
         
          return cert;
        } finally {
          IoUtil.close(is);
        }
View Full Code Here

Examples of com.caucho.hessian.io.Hessian2Input

  }

  public void invoke(InputStream is, OutputStream os)
  {
    try {
      Hessian2Input in = new Hessian2Input(is);
      AbstractHessianOutput out;

      SerializerFactory serializerFactory = getSerializerFactory();

      in.setSerializerFactory(serializerFactory);

      int code = in.read();

      if (code != 'c') {
        // XXX: deflate
        throw new IOException(L.l("expected 'c' in hessian input at {0}",
                                  code));
      }

      int major = in.read();
      int minor = in.read();

      if (major >= 2)
        out = new Hessian2Output(os);
      else
        out = new HessianOutput(os);
View Full Code Here

Examples of com.caucho.hessian.io.Hessian2Input

        BytesMessageInputStream is =
          new BytesMessageInputStream((BytesMessage) message);

        NullOutputStream os = new NullOutputStream();

        Hessian2Input in = new Hessian2Input(is);
        AbstractHessianOutput out;

        SerializerFactory serializerFactory = getSerializerFactory();

        in.setSerializerFactory(serializerFactory);

        int code = in.read();

        if (code != 'c') {
          // XXX: deflate
          throw new IOException("expected 'c' in hessian input at " + code);
        }

        int major = in.read();
        int minor = in.read();

        if (major >= 2)
          out = new Hessian2Output(os);
        else
          out = new HessianOutput(os);
View Full Code Here

Examples of com.caucho.hessian.io.Hessian2Input

      if (rs.next()) {
        Serializable payload = null;

        InputStream is = rs.getBinaryStream(1);
        if (is != null) {
          Hessian2Input in = new Hessian2Input(is);

          payload = (Serializable) in.readObject();

          in.close();
          is.close();
        }

        return payload;
      }
View Full Code Here

Examples of com.caucho.hessian.io.Hessian2Input

        throw new HessianProtocolException(L.l("expected 'H' at '{0}'", ch));

      int major = is.read();
      int minor = is.read();

      AbstractHessianInput in = new Hessian2Input(is);

      return in.readReply(method.getReturnType());
    } catch (HessianProtocolException e) {
      throw new RuntimeException(e);
    } finally {
      try {
        if (is != null)
View Full Code Here

Examples of com.caucho.hessian.io.Hessian2Input

  public static Hessian2Input getInputStream(String fileName){
    FileInputStream fis;
    try{
      fis = new FileInputStream(fileName);
      BufferedInputStream bis = new BufferedInputStream(fis);
      Hessian2Input his = new Hessian2Input(bis);
      Deflation dis = new Deflation();
      return dis.unwrap(his);
    }
    catch(Exception e){
      MessageGenerator.briefError("Problem opening stream for file: " + fileName);
View Full Code Here

Examples of com.caucho.hessian.io.Hessian2Input

    }
    return true;
  }
 
  public static Object loadFromCompressedFile(String fileName){
    Hessian2Input his = getInputStream(fileName);
    try{
      Object o = his.readObject();
      his.close();
      return o;
    }
    catch(IOException e){
      return null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.