Package gnu.java.rmi

Examples of gnu.java.rmi.RMIMarshalledObjectOutputStream


   * @throws IOException if an I/O error during serialization occurs.
   */
  public MarshalledObject(T obj) throws IOException
  {
    ByteArrayOutputStream objStream = new ByteArrayOutputStream();
    RMIMarshalledObjectOutputStream stream =
      new RMIMarshalledObjectOutputStream(objStream);
    stream.writeObject(obj);
    stream.flush();
    objBytes = objStream.toByteArray();
    locBytes = stream.getLocBytes();

    // The following algorithm of calculating hashCode is similar to String
    hash = 0;
    for (int i = 0; i < objBytes.length; i++)
      hash = hash * 31 + objBytes[i];
View Full Code Here

TOP

Related Classes of gnu.java.rmi.RMIMarshalledObjectOutputStream

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.