public void readObject(DataInput in) throws IOException {

    boolean sgIO = in.readBoolean();
    int nodeID = in.readInt();

    int nodeClassID = in.readShort();

    nodeClassName = null;

    if (nodeClassID == -1) nodeClassName = in.readUTF();

    readConstructorParams(in);

    if (nodeClassID != -1) {
      node = createNode();
      nodeClassName = node.getClass().getName();
    } else node = createNode(nodeClassName);

    if (sgIO) {
      if (control.getCurrentFileVersion() == 1)
        ((com.sun.j3d.utils.scenegraph.io.SceneGraphIO) node).readSceneGraphObject(in);
      else {
        int size = in.readInt();
        if (node instanceof com.sun.j3d.utils.scenegraph.io.SceneGraphIO) {
          byte[] bytes = new byte[size];
          in.readFully(bytes);
          ByteArrayInputStream byteStream = new ByteArrayInputStream(bytes);
          DataInputStream tmpIn = new DataInputStream(byteStream);
          ((com.sun.j3d.utils.scenegraph.io.SceneGraphIO) node).readSceneGraphObject(tmpIn);
          tmpIn.close();
        } else {
          in.skipBytes(size);
        }
      }
    }

    symbol = control.getSymbolTable().createSymbol(this, node, nodeID);
    readUserData(in);
    if (control.getCurrentFileVersion() > 2) {
      node.setName(readString(in));
    }

    readCapabilities(in);
  }