/*
********************************************************************
/* Other internal methods
********************************************************************
966378
private void _badType(int type, Object value)
    {
        if (type < 0) {
            throw new IllegalStateException(String.format(
                    "Internal error: missing BeanDefinition for id %d (class %s)",
                    type, value.getClass().getName()));
        }
        String typeDesc = (value == null) ? "NULL" : value.getClass().getName();
        throw new IllegalStateException(String.format("Unsupported type: %s (%s)", type, typeDesc));
    }
502857
@Override
  public void writeExternal(ObjectOutput out) throws IOException {
    super.writeExternal(out);
    out.writeObject(conservativeApproximation);
  }
743565
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
        comparator = (Comparator) in.readObject();
        elements = (Activation[]) in.readObject();
        size = in.readInt();
    }
1082408
@Override
    public void readExternal(ObjectInput in)
        throws IOException, ClassNotFoundException {

        byte header = in.readByte();

        switch (header) {
            case FRENCH_REV:
                this.obj = this.readFrenchRev(in);
                break;
            default:
                throw new InvalidObjectException("Unknown calendar type.");
        }

    }
27994
@Override
    public void readExternal(ObjectInput in)
        throws IOException, ClassNotFoundException {

        byte header = in.readByte();
        int typeInfo = (header & 0xFF) >> 2;

        switch (typeInfo) {
            case DATE_TYPE:
                this.obj = readDateInterval(in);
                break;
            case TIME_TYPE:
                this.obj = readClockInterval(in);
                break;
            case TIMESTAMP_TYPE:
                this.obj = readTimestampInterval(in);
                break;
            case MOMENT_TYPE:
                this.obj = readMomentInterval(in);
                break;
            case YEAR_TYPE:
                this.obj = readCalendarYear(in);
                break;
            case QUARTER_TYPE:
                this.obj = readCalendarQuarter(in);
                break;
            case MONTH_TYPE:
                this.obj = readCalendarMonth(in);
                break;
            case WEEK_TYPE:
                this.obj = readCalendarWeek(in);
                break;
            case DATE_WINDOW_ID:
                this.obj = readDateWindows(in);
                break;
            case CLOCK_WINDOW_ID:
                this.obj = readClockWindows(in);
                break;
            case TIMESTAMP_WINDOW_ID:
                this.obj = readTimestampWindows(in);
                break;
            case MOMENT_WINDOW_ID:
                this.obj = readMomentWindows(in);
                break;
            case GENERIC_WINDOW_ID:
                this.obj = readGenericWindows(in);
                break;
            case BOUNDARY_TYPE:
                this.obj = readBoundary(in, header);
                break;
            default:
                throw new StreamCorruptedException("Unknown serialized type.");
        }

    }
410164
public function flush()
    {
        try {
            $this->getAdapter()->flush();
        } catch (\Exception $e) {
            throw new InternalException($e->getMessage(), $e->getCode(), $e);
        }
    }
482780
@Override
    public void readExternal(ObjectInput in)
        throws IOException, ClassNotFoundException {

        byte header = in.readByte();

        switch ((header & 0xFF) >> 4) {
            case FALLBACK_TIMEZONE_TYPE:
                this.obj = this.readFallback(in, header);
                break;
            case TRANSITION_RESOLVER_TYPE:
                this.obj = this.readStrategy(header);
                break;
            case HISTORIZED_TIMEZONE_TYPE:
                this.obj = this.readZone(in, header);
                break;
            case ZONAL_OFFSET_TYPE:
                this.obj = this.readOffset(in, header);
                break;
            default:
                throw new StreamCorruptedException("Unknown serialized type.");
        }

    }
622873
public void writeExternal(java.io.ObjectOutput objectOutput)
                    throws java.io.IOException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass
                        , "writeExternal"
                        , "objectOutput=" + objectOutput + "(java.io.ObjectOutput)"
                            );
        objectOutput.writeByte(externalVersion);
        objectOutput.writeInt(objectStoreIdentifier);
        objectOutput.writeLong(storedObjectIdentifier);

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass
                       , "writeExternal"
                            );
    }
466762
public void readExternal(ObjectInput in) throws IOException,
			ClassNotFoundException {
		if(logger.isDebugEnabled()) {
            logger.debug("readExternal");
        }

		super.readExternal(in);
		String messageString = in.readUTF();
		try {
			message = SipFactoryImpl.messageFactory.createRequest(messageString);
		} catch (ParseException e) {
			throw new IllegalArgumentException("Message " + messageString + " previously serialized could not be reparsed", e);
		}
		boolean isLinkedRequestSerialized = in.readBoolean();
		if (isLinkedRequestSerialized) {
			linkedRequest = (SipServletRequestImpl) in.readObject();
		}
		createDialog = in.readBoolean();
		String routingDirectiveString = in.readUTF();
		if(!routingDirectiveString.equals("")) {
			routingDirective = SipApplicationRoutingDirective.valueOf(routingDirectiveString);
		}
		String routingStateString = in.readUTF();
		if(!routingStateString.equals("")) {
			routingState = RoutingState.valueOf(routingStateString);
		}
		boolean isRoutingRegionSet = in.readBoolean();
		if(isRoutingRegionSet) {
			routingRegion = (SipApplicationRoutingRegion) in.readObject();
		}
		isInitial = in.readBoolean();
		if(logger.isDebugEnabled()) {
            logger.debug("readExternal - isInitial=" + isInitial);
        }
		isFinalResponseGenerated = in.readBoolean();
		is1xxResponseGenerated = in.readBoolean();
	}
432912
public void writeExternal(ObjectOutput out) throws IOException
   {
      out.writeInt(eventType);

      byte[] buff = sessionId.getBytes(Constants.DEFAULT_ENCODING);
      out.writeInt(buff.length);
      out.write(buff);

      int listSize = items.size();
      out.writeInt(listSize);
      for (int i = 0; i < listSize; i++)
      {
         out.writeObject(items.get(i));
      }

      if (pairId != null)
      {
         out.writeInt(NOT_NULL_VALUE);
         buff = pairId.getBytes(Constants.DEFAULT_ENCODING);
         out.writeInt(buff.length);
         out.write(buff);
      }
      else
      {
         out.writeInt(NULL_VALUE);
      }
   }
257301
@Override
  @Nonnull
  @OverridingMethodsMustInvokeSuper
  protected IMicroNode internalConvertToMicroNode (@Nonnull final IHCConversionSettingsToNode aConversionSettings)
  {
    // Create the element
    final IMicroElement ret = createMicroElement (aConversionSettings);
    if (ret == null)
      throw new IllegalStateException ("Created a null element!");

    // Set all HTML attributes etc.
    fillMicroElement (ret, aConversionSettings);

    // Optional callback after everything was done (implementation dependent)
    finishMicroElement (ret, aConversionSettings);
    return ret;
  }
575141
function init() {
    if (tokens) {
      return;
    }
    if (fromString) {
      tokens = cbml.parse(contentString);
    }
    else {
      tokens = cbml.parse(fs.readFileSync(filename));
    }
    /*<debug>
    console.log(JSON.stringify(tokens, null, '  '));
    //</debug>*/
  }
605295
public function init()
    {
        parent::init();

        /**
         * check whether we have extraRowColumns set, forbid filters
         */
        if (!empty($this->extraRowColumns)) {
            foreach ($this->columns as $column) {
                if ($column instanceof CDataColumn && in_array($column->name, $this->extraRowColumns)) {
                    $column->filterHtmlOptions = array('style' => 'display:none');
                    $column->filter = false;
                }
            }
        }
        /**
         * setup extra row options
         */
        if (isset($this->extraRowHtmlOptions['class']) && !empty($this->extraRowCssClass)) {
            $this->extraRowHtmlOptions['class'] .= ' ' . $this->extraRowCssClass;
        } else {
            $this->extraRowHtmlOptions['class'] = $this->extraRowCssClass;
        }
    }
295508
public function init()
    {
        if (!isset($this->options['id'])) {
            $this->options['id'] = $this->getId();
        }

        if (!isset($this->options['data-success-class'])) {
            $this->options['data-success-class'] = $this->successCssClass;
        }

        if (!isset($this->options['data-error-class'])) {
            $this->options['data-error-class'] = $this->errorCssClass;
        }

        if ($this->enableClientValidation) {
            $this->registerAfterValidateHandler();
        }

        parent::init();
    }
960789
private void processExternalListener(Class<?> listenerClass) {
    ExternalListenerMetadata listenerMetadata = ExternalListenerIntrospector
        .introspect(listenerClass);
    Map<CallbackType, Method> callbacks = listenerMetadata.getCallbacks();
    if (callbacks != null) {
      for (Map.Entry<CallbackType, Method> entry : callbacks.entrySet()) {
        validateExternalCallback(entry.getValue(), entry.getKey());
      }
    }
  }
827626
public void writeExternal(ObjectOutput out) throws IOException {
		super.writeExternal(out);
		if(linkedRequest == null) {
			out.writeBoolean(false);
		} else {
			out.writeBoolean(true);
			out.writeObject(linkedRequest);
		}
		out.writeBoolean(createDialog);
		if(routingDirective != null) {
			out.writeUTF(routingDirective.toString());
		} else {
			out.writeUTF("");
		}
		if(routingState != null) {
			out.writeUTF(routingState.toString());
		} else {
			out.writeUTF("");
		}
		if(routingRegion != null) {
			out.writeBoolean(true);
			out.writeObject(routingRegion);
		} else {
			out.writeBoolean(false);
		}
		out.writeBoolean(isInitial);
		if(logger.isDebugEnabled()) {
            logger.debug("writeExternal - isInitial=" + isInitial);
        }
		out.writeBoolean(isFinalResponseGenerated);
		out.writeBoolean(is1xxResponseGenerated);
	}
550316
@Override
    public void readExternal(ObjectInput in)
        throws IOException, ClassNotFoundException {

        int header = in.readByte();

        switch (header) {
            case NEGATIVE_DAY_OF_MONTH_PATTERN_TYPE:
                this.obj = readPattern(in);
                break;
            default:
                throw new StreamCorruptedException("Unknown serialized type.");
        }

    }