private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();

    isAdapter = in.readBoolean();
    if (isAdapter) {
      if (adapter_readAdapterObject == null) throw new ClassNotFoundException();
      Object[] args = {this, in};
      try {
        javaObject = adapter_readAdapterObject.invoke(null, args);
      } catch (Exception ex) {
        throw new IOException();
      }
    } else {
      javaObject = in.readObject();
    }

    String className = (String) in.readObject();
    if (className != null) {
      staticType = Class.forName(className);
    } else {
      staticType = null;
    }

    initMembers();
  }
Exemplo n.º 2
0
 private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
   stream.defaultReadObject();
   int maxPrototypeId = stream.readInt();
   if (maxPrototypeId != 0) {
     activatePrototypeMap(maxPrototypeId);
   }
 }
Exemplo n.º 3
0
  private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    //    System.err.println("Before decompression:");
    //    System.err.println("arg size: " + argCounter.size() + "  total: " +
    // argCounter.totalCount());
    //    System.err.println("stop size: " + stopCounter.size() + "  total: " +
    // stopCounter.totalCount());

    ClassicCounter<IntDependency> compressedArgC = argCounter;
    argCounter = new ClassicCounter<IntDependency>();
    ClassicCounter<IntDependency> compressedStopC = stopCounter;
    stopCounter = new ClassicCounter<IntDependency>();
    for (IntDependency d : compressedArgC.keySet()) {
      double count = compressedArgC.getCount(d);
      expandArg(d, d.distance, count);
    }

    for (IntDependency d : compressedStopC.keySet()) {
      double count = compressedStopC.getCount(d);
      expandStop(d, d.distance, count, false);
    }

    //    System.err.println("After decompression:");
    //    System.err.println("arg size: " + argCounter.size() + "  total: " +
    // argCounter.totalCount());
    //    System.err.println("stop size: " + stopCounter.size() + "  total: " +
    // stopCounter.totalCount());

    expandDependencyMap = null;
  }
Exemplo n.º 4
0
 /**
  * Read an object from a deserialization stream.
  *
  * @param s An object deserialization stream.
  * @throws ClassNotFoundException If the object's class read from the stream cannot be found.
  * @throws IOException If an error occurs reading from the stream.
  */
 @SuppressWarnings("unchecked")
 private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException {
   s.defaultReadObject();
   final T value = (T) s.readObject();
   final List<Node<T>> children = (List<Node<T>>) s.readObject();
   node = new Node<>(value, children);
 }
  private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    // We have to call defaultReadObject first.
    in.defaultReadObject();

    // Read version number.
    byte major = in.readByte();
    byte minor = in.readByte();
    if (major != 1) {
      throw new IOException("LogRecord: bad version: " + major + "." + minor);
    }
    int len = in.readInt();
    if (len == -1) {
      parameters = null;
    } else {
      parameters = new Object[len];
      for (int i = 0; i < parameters.length; i++) {
        parameters[i] = in.readObject();
      }
    }
    // If necessary, try to regenerate the resource bundle.
    if (resourceBundleName != null) {
      try {
        resourceBundle = ResourceBundle.getBundle(resourceBundleName);
      } catch (MissingResourceException ex) {
        // This is not a good place to throw an exception,
        // so we simply leave the resourceBundle null.
        resourceBundle = null;
      }
    }

    needToInferCaller = false;
  }
Exemplo n.º 6
0
 protected void doReadObject(ObjectInputStream s) {
   try {
     s.defaultReadObject();
     read(s);
   } catch (Exception e) {
     throw new RuntimeException(e);
   }
 }
Exemplo n.º 7
0
  private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
    Object[] tValues;

    s.defaultReadObject();

    tValues = (Object[]) s.readObject();

    if (tValues.length > 0 && tValues[0].equals("userObject")) userObject = tValues[1];
  }
Exemplo n.º 8
0
 private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
   // Default state initialization happens here
   ois.defaultReadObject();
   // Initialization of transient Res Bundle happens here .
   try {
     resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
   } catch (IOException ioe) {
     throw new RuntimeException(ioe);
   }
 }
Exemplo n.º 9
0
  private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException {

    s.defaultReadObject();

    FigureEnumeration k = figures();
    while (k.hasMoreElements()) {
      Figure figure = k.nextFigure();
      figure.addToContainer(this);
    }
  }
Exemplo n.º 10
0
  private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException {

    s.defaultReadObject();

    fSelection = CollectionsFactory.current().createList(); // could use lazy initialization instead
    if (drawing() != null) {
      drawing().addDrawingChangeListener(this);
    }
    fSelectionListeners = CollectionsFactory.current().createList();
  }
Exemplo n.º 11
0
  private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {

    in.defaultReadObject();

    Object prefix = in.readObject();
    Object uri = in.readObject();

    if (prefix != null) { // else leave namespace null here
      namespace = Namespace.getNamespace((String) prefix, (String) uri);
    }
  }
  private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException {

    s.defaultReadObject();

    if (getStartConnector() != null) {
      connectStart(getStartConnector());
    }
    if (getEndConnector() != null) {
      connectEnd(getEndConnector());
    }
  }
Exemplo n.º 13
0
  /** Deserialize this deque. */
  @SuppressWarnings("unchecked")
  private void readObject(ObjectInputStream s) throws 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] = (E) s.readObject();
  }
Exemplo n.º 14
0
 private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
   in.defaultReadObject();
   if (parmsLength > 0) {
     Class[] types = member.argTypes;
     typeTags = new byte[parmsLength];
     for (int i = 0; i != parmsLength; ++i) {
       typeTags[i] = (byte) getTypeTag(types[i]);
     }
   }
   if (member.isMethod()) {
     Method method = member.method();
     Class returnType = method.getReturnType();
     if (returnType == Void.TYPE) {
       hasVoidReturn = true;
     } else {
       returnTypeTag = getTypeTag(returnType);
     }
   }
 }
  /** Deserialize the <tt>IdentityWeakHashMap</tt> from a stream. */
  private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
    // Read in the threshold, loadfactor (and any hidden 'magic' stuff).
    s.defaultReadObject();

    // Read in number of buckets and allocate the bucket array;
    int numBuckets = s.readInt();
    entries = new WeakEntry[numBuckets];
    // Read in size (count)
    int size = s.readInt();

    // Read the mappings and add to the IdentityWeakHashMap
    for (int i = 0; i < size; i++) {
      Object key = s.readObject();
      Object value = s.readObject();
      // only re-add if not null as could have been garbage collected at any time
      // before the writeObject
      if (key != null && value != null) {
        put((K) key, (V) value);
      }
    }
  }
Exemplo n.º 16
0
 private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
   in.defaultReadObject();
   url = new URL(serialiseUrl);
 }
Exemplo n.º 17
0
 private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
   in.defaultReadObject();
 }
 /**
  * Subclassed to update the internal representation of the mask after the default read operation
  * has completed.
  */
 private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
   s.defaultReadObject();
   updateMaskIfNecessary();
 }
 private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
   in.defaultReadObject();
   delegatePolicy = (FocusTraversalPolicy) in.readObject();
   delegateManager = (DefaultFocusManager) in.readObject();
 }
Exemplo n.º 20
0
 // Deserialize properly
 private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
   s.defaultReadObject();
   setState(0); // reset to unlocked state
 }
Exemplo n.º 21
0
 private Integer readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
   readObjectCalled = true;
   in.defaultReadObject();
   return null;
 }
Exemplo n.º 22
0
  /**
   * Called upon deserialization, which tells the log entries who their parent is
   *
   * @param ois The input stream
   */
  private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
    ois.defaultReadObject();

    for (int i = 0; i < entries.length; i++)
      if (entries[i] != null) entries[i].setParent(new PhantomLogEntry(entries[i]));
  }
Exemplo n.º 23
0
 private void readObject(ObjectInputStream aInputStream)
     throws ClassNotFoundException, IOException {
   aInputStream.defaultReadObject();
   counters = (Level.objCounters) aInputStream.readObject();
 }
Exemplo n.º 24
0
 private void readObject(ObjectInputStream aInputStream) throws Exception {
   aInputStream.defaultReadObject();
 }
Exemplo n.º 25
0
 private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
   ois.defaultReadObject();
 }
Exemplo n.º 26
0
/*
Exemplo n.º 27
0
 /** Restores a serialized object. */
 private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException {
   s.defaultReadObject();
   valueDrawer = defaultValueDrawer;
 }
 private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
   stream.defaultReadObject();
   init(getName(), actions);
 }
Exemplo n.º 29
0
 private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
   stream.defaultReadObject();
   b = (String) stream.readObject();
 }
Exemplo n.º 30
0
 private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
   in.defaultReadObject();
   stream = new FileOutputStream(this.fileName, true);
 }