Ejemplo n.º 1
0
  /** writeObject is called to save the state of the {@code BatchUpdateException} to a stream. */
  private void writeObject(ObjectOutputStream s) throws IOException, ClassNotFoundException {

    ObjectOutputStream.PutField fields = s.putFields();
    fields.put("updateCounts", updateCounts);
    fields.put("longUpdateCounts", longUpdateCounts);
    s.writeFields();
  }
Ejemplo n.º 2
0
 /**
  * Save the state of the {@code Vector} instance to a stream (that is, serialize it). This method
  * performs synchronization to ensure the consistency of the serialized data.
  */
 private void writeObject(j86.java.io.ObjectOutputStream s) throws j86.java.io.IOException {
   final j86.java.io.ObjectOutputStream.PutField fields = s.putFields();
   final Object[] data;
   synchronized (this) {
     fields.put("capacityIncrement", capacityIncrement);
     fields.put("elementCount", elementCount);
     data = elementData.clone();
   }
   fields.put("elementData", data);
   s.writeFields();
 }
Ejemplo n.º 3
0
  // Serialization support.
  private void writeObject(ObjectOutputStream s) throws IOException {
    Object[] tValues;

    s.defaultWriteObject();
    // Save the userObject, if its Serializable.
    if (userObject != null && userObject instanceof Serializable) {
      tValues = new Object[2];
      tValues[0] = "userObject";
      tValues[1] = userObject;
    } else tValues = new Object[0];
    s.writeObject(tValues);
  }
Ejemplo n.º 4
0
  /**
   * Writes default serializable fields to stream. Writes a list of serializable <code>ItemListeners
   * </code> as optional data. The non-serializable <code>ItemListeners</code> are detected and no
   * attempt is made to serialize them.
   *
   * @param s the <code>ObjectOutputStream</code> to write
   * @serialData <code>null</code> terminated sequence of 0 or more pairs; the pair consists of a
   *     <code>String</code> and an <code>Object</code>; the <code>String</code> indicates the type
   *     of object and is one of the following: <code>itemListenerK</code> indicating an <code>
   *     ItemListener</code> object
   * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener)
   * @see j86.java.awt.Component#itemListenerK
   * @see #readObject(ObjectInputStream)
   */
  private void writeObject(ObjectOutputStream s) throws j86.java.io.IOException {
    s.defaultWriteObject();

    AWTEventMulticaster.save(s, itemListenerK, itemListener);
    s.writeObject(null);
  }