Package com.caucho.hessian.io

Examples of com.caucho.hessian.io.Hessian2Output


                           ServletResponse res)
    throws IOException
  {
    res.setContentType("application/x-caucho-jsf-developer-aid");

    Hessian2Output out = new Hessian2Output(res.getOutputStream());

    out.writeObject(aidMap);

    out.flush();
  }
View Full Code Here


    throws IOException
  {
    if (log.isLoggable(Level.FINEST))
      os = new HessianDebugOutputStream(os, log, Level.FINEST);

    Hessian2Output hOut = new Hessian2Output(os);

    hOut.writeObject(value);

    hOut.close();
  }
View Full Code Here

    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"))
        executeLookup(args, in, out);
      else if (method.equals("list"))
        executeList(args, in, out);
      else
        executeUnknown(method, args, in, out);
    } catch (HessianProtocolException e) {
      throw e;
    } catch (Throwable e) {
      log.log(Level.WARNING, e.toString(), e);

      out.startReply();
      out.writeFault("ServiceException", e.getMessage(), e);
      out.completeReply();
    }
   
    out.flush();
  }
View Full Code Here

     
      SelfEncryptedCookie cookieObj
        = new SelfEncryptedCookie(cookie, createTime);

      TempOutputStream tos = new TempOutputStream();
      Hessian2Output hOut = new Hessian2Output(tos);

      hOut.writeObject(cookieObj);

      hOut.close();

      TempOutputStream cipherOut = new TempOutputStream();
      CipherOutputStream cOut
        = new CipherOutputStream(cipherOut, cipher);
View Full Code Here

      Path certPath = certDir.lookup(name + ".cert");
     
      WriteStream os = certPath.openWrite();
       
      try {
        Hessian2Output hOut = new Hessian2Output(os);
       
        hOut.writeObject(cert);
       
        hOut.close();
      } finally {
        IoUtil.close(os);
      }
    } catch (Exception e) {
      log.log(Level.FINER, e.toString(), e);
View Full Code Here

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

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

      out.setSerializerFactory(serializerFactory);
View Full Code Here

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

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

        out.setSerializerFactory(serializerFactory);
View Full Code Here

    StoreConnection conn = null;
   
    try {
      TempOutputStream os = new TempOutputStream();
     
      Hessian2Output out = new Hessian2Output(os);
      out.writeObject(payload);
      out.close();
   
      conn = getConnection();

      PreparedStatement sendStmt = conn.prepareSend();
View Full Code Here

    ReadStream is = pair.getReadStream();
    WriteStream os = pair.getWriteStream();

    try {
      Hessian2Output out = new Hessian2Output(os);
     
      out.writeVersion();
      out.call(methodName, args);
      out.flush();

      return is;
    } catch (IOException e) {
      try {
        os.close();
View Full Code Here

  public static Hessian2Output getOutputStream(String fileName){
    FileOutputStream fos;
    try{
      fos = new FileOutputStream(fileName);
      BufferedOutputStream bos = new BufferedOutputStream(fos);
      Hessian2Output hos = new Hessian2Output(bos);
      Deflation dos = new Deflation();
      return dos.wrap(hos);
    }
    catch(Exception e){
      MessageGenerator.briefError("Problem opening stream for file: " + fileName);
View Full Code Here

TOP

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

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.