Package com.caucho.hessian.io

Examples of com.caucho.hessian.io.Hessian2Output.writeObject()


      WriteStream os = certPath.openWrite();
       
      try {
        Hessian2Output hOut = new Hessian2Output(os);
       
        hOut.writeObject(cert);
       
        hOut.close();
      } finally {
        IoUtil.close(os);
      }
View Full Code Here


   
    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

  }

  public static boolean saveToCompressedFile(Object o, String fileName){
    Hessian2Output hos = getOutputStream(fileName);
    try{
      hos.writeObject(o);
      hos.close();
    }
    catch(IOException e){
      return false;
    }
View Full Code Here

  }
 
  public static InputStream writeObject_Hessian(Serializable obj) throws IOException{
    ByteArrayOutputStream bos=new ByteArrayOutputStream();
    Hessian2Output out=new Hessian2Output(bos);
    out.writeObject(obj);
    out.flushBuffer();
    System.out.println(bos.size()+","+Arrays.toString(bos.toByteArray()));
    return new ByteArrayInputStream(bos.toByteArray());
  }
 
View Full Code Here

    }

    public void serialize(Object data, OutputStream outputStream) throws IOException {
        Hessian2Output hession2Output = new Hessian2Output(outputStream);

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

    public Object deserialize(Class clazz, InputStream inputStream) throws IOException {
        Hessian2Input hession2Input = new Hessian2Input(inputStream);
View Full Code Here

   
    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

  = new SelfEncryptedCookie(cookie, createTime);

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

      hOut.writeObject(cookieObj);

      hOut.close();

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

        synchronized (out) {
          out.startPacket();
          out.writeInt(HmtpPacketType.MESSAGE.ordinal());
          out.writeString(to);
          out.writeString(from);
          out.writeObject(value);
          out.endPacket();
 
          if (_isAutoFlush)
            out.flush();
        }
View Full Code Here

  synchronized (out) {
    out.startPacket();
    out.writeInt(HmtpPacketType.MESSAGE_ERROR.ordinal());
    out.writeString(to);
    out.writeString(from);
    out.writeObject(value);
    out.writeObject(error);
    out.endPacket();
 
    if (_isAutoFlush)
      out.flush();
View Full Code Here

    out.startPacket();
    out.writeInt(HmtpPacketType.MESSAGE_ERROR.ordinal());
    out.writeString(to);
    out.writeString(from);
    out.writeObject(value);
    out.writeObject(error);
    out.endPacket();
 
    if (_isAutoFlush)
      out.flush();
  }
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.