Code example for ObjectInputStream

Methods: readDouble

   * @throws ClassNotFoundException if serialized object class cannot be found. 
  public Object readObject (final ObjectInputStream in)
          throws IOException, ClassNotFoundException 
    final double x = in.readDouble();
    final double y = in.readDouble();
    final double w = in.readDouble();
    final double h = in.readDouble();
    return new Ellipse2D.Double(x, y, w, h);
   * Returns the class of the object, which this object can serialize. 
   * @return the class of java.awt.geom.Ellipse2D. 
  public Class getObjectClass ()
    return Ellipse2D.class;