Code example for ObjectInputStream

Methods: readDouble, readInt

0
   * @throws ClassNotFoundException if serialized object class cannot be found. 
   */ 
  public Object readObject(final ObjectInputStream stream)
      throws IOException, ClassNotFoundException 
  { 
    final double x = stream.readDouble();
    final double y = stream.readDouble();
    final double w = stream.readDouble();
    final double h = stream.readDouble();
    final double as = stream.readDouble(); // Angle Start
    final double ae = stream.readDouble(); // Angle Extent
    final int at = stream.readInt();       // Arc type
    //noinspection MagicConstant 
    return new Arc2D.Double(x, y, w, h, as, ae, at);
  } 
 
  /** 
   * The class of the object, which this object can serialize. 
   * 
   * @return the class of the object type, which this method handles. 
   */