Esempio n. 1
0
 private void writeObject(java.io.ObjectOutputStream out) throws IOException {
   out.writeFloat(_goodness);
   out.writeInt(getWidth());
   out.writeInt(getHeight());
   int[] row = new int[getWidth()];
   for (int y = 0; y < getHeight(); y++) {
     _i.getRGB(0, y, row.length, 1, row, 0, 0);
     out.writeObject(row);
   }
 }
Esempio n. 2
0
  /**
   * Serialize this deque.
   *
   * @serialData The current size (<tt>int</tt>) of the deque, followed by all of its elements (each
   *     an object reference) in first-to-last order.
   */
  private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
    s.defaultWriteObject();

    // Write out size
    s.writeInt(size());

    // Write out elements in order.
    int mask = elements.length - 1;
    for (int i = head; i != tail; i = (i + 1) & mask) s.writeObject(elements[i]);
  }