Code example for ObjectOutputStream

Methods: writeDouble

0
   */ 
  public void writeObject (final Object o, final ObjectOutputStream out)
          throws IOException 
  { 
    final Point2D point = (Point2D) o;
    out.writeDouble(point.getX());
    out.writeDouble(point.getY());
  } 
 
  /** 
   * Reads the object from the object input stream. 
   * 
   * @param in the object input stream from where to read the serialized data. 
   * @return the generated object. 
   * 
   * @throws IOException            if reading the stream failed. 
   * @throws ClassNotFoundException if serialized object class cannot be found. 
   */ 
  public Object readObject (final ObjectInputStream in)
          throws IOException, ClassNotFoundException 
  {