Package com.caucho.hessian.io

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


    out.writeInt(HmtpPacketType.MESSAGE.ordinal());
    writeAddress(out, to);
    writeAddress(out, from);
    out.writeObject(payload);

    out.flushBuffer();
  }

  /**
   * Sends a message error to a given address
   */
 
View Full Code Here


    writeAddress(out, to);
    writeAddress(out, from);
    out.writeObject(value);
    out.writeObject(error);
   
    out.flushBuffer();
  }

  //
  // query
  //
View Full Code Here

    writeAddress(out, to);
    writeAddress(out, from);
    out.writeLong(id);
    out.writeObject(value);

    out.flushBuffer();
  }

  /**
   * Low-level query response
   */
 
View Full Code Here

    writeAddress(out, to);
    writeAddress(out, from);
    out.writeLong(id);
    out.writeObject(value);
   
    out.flushBuffer();
  }

  /**
   * Low-level query error
   */
 
View Full Code Here

    writeAddress(out, from);
    out.writeLong(id);
    out.writeObject(value);
    out.writeObject(error);
   
    out.flushBuffer();
  }
 
  private void writeAddress(Hessian2Output out, String address)
    throws IOException
  {
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());
  }
 
  public static void readObject_Hessian(InputStream in) throws IOException{
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.