示例#1
0
文件: CA.java 项目: jkwhite/nausicaa
 private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
   _goodness = in.readFloat();
   int w = in.readInt();
   int h = in.readInt();
   _i = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
   for (int y = 0; y < h; y++) {
     int[] row = (int[]) in.readObject();
     _i.setRGB(0, y, w, 1, row, 0, 0);
   }
 }
示例#2
0
  /** Deserialize this deque. */
  private void readObject(java.io.ObjectInputStream s)
      throws java.io.IOException, ClassNotFoundException {
    s.defaultReadObject();

    // Read in size and allocate array
    int size = s.readInt();
    allocateElements(size);
    head = 0;
    tail = size;

    // Read in all elements in the proper order.
    for (int i = 0; i < size; i++) elements[i] = s.readObject();
  }
  /**
   * Reconstitute the <tt>ConcurrentHashMap</tt> instance from a stream (i.e., deserialize it).
   *
   * @param s the stream
   */
  private void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException {
    s.defaultReadObject();

    // Initialize each segment to be minimally sized, and let grow.
    for (int i = 0; i < segments.length; ++i) {
      segments[i].setTable(new HashEntry[1]);
    }

    // Read the keys and values, and put the mappings in the table
    for (; ; ) {
      K key = (K) s.readObject();
      V value = (V) s.readObject();
      if (key == null) break;
      put(key, value);
    }
  }
 private void readObject(java.io.ObjectInputStream in)
     throws java.io.IOException, ClassNotFoundException {
   in.defaultReadObject();
   synchronized (this) {
     wq_ = new FIFOWaitQueue();
   }
 }
  private void readObject(java.io.ObjectInputStream stream)
      throws java.io.IOException, ClassNotFoundException {

    stream.defaultReadObject();
    try {
      buildExpression(cronExpression);
    } catch (Exception ignore) {
    } // never happens
  }
 // Special deserializer: read XML as deserialization
 private void readObject(java.io.ObjectInputStream in)
     throws java.io.IOException, ClassNotFoundException {
   try {
     init(comparators, runtimeVersion);
     String strDocument = in.readUTF();
     // System.out.println("strDocument='"+strDocument+"'");
     ByteArrayInputStream bais = new ByteArrayInputStream(strDocument.getBytes());
     Document doc = GraphManager.createXmlDocument(bais, false);
     initOptions(Common.NO_DEFAULT_VALUES);
     initFromNode(doc, Common.NO_DEFAULT_VALUES);
   } catch (Schema2BeansException e) {
     throw new RuntimeException(e);
   }
 }
示例#7
0
 private void readObject(final java.io.ObjectInputStream s)
     throws java.io.IOException, ClassNotFoundException {
   s.defaultReadObject();
   if (waitingProducers instanceof FifoWaitQueue) transferer = new TransferQueue();
   else transferer = new TransferStack();
 }
 private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
   in.defaultReadObject();
 }
 /** readObject is called to restore the state of the ServicePermission from a stream. */
 private void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException {
   // Read in the action, then initialize the rest
   s.defaultReadObject();
   init(getName(), getMask(actions));
 }
示例#10
0
 private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
   in.defaultReadObject();
   dictionary = Dictionary.getRestoreDictionary();
 }
示例#11
0
 /** readObject is called to restore the state of the ExecPermission from a stream. */
 private synchronized void readObject(java.io.ObjectInputStream s)
     throws IOException, ClassNotFoundException {
   s.defaultReadObject();
   // init is called to initialize the rest of the values.
   init(getName());
 }