java.io.ObjectInput#readBoolean ( )源码实例Demo

下面列出了java.io.ObjectInput#readBoolean ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: astor   文件: NordsieckStepInterpolator.java
/** {@inheritDoc} */
@Override
public void readExternal(final ObjectInput in)
    throws IOException, ClassNotFoundException {

    // read the base class
    final double t = readBaseExternal(in);

    // read the local attributes
    scalingH      = in.readDouble();
    referenceTime = in.readDouble();

    final int n = (currentState == null) ? -1 : currentState.length;
    final boolean hasScaled = in.readBoolean();
    if (hasScaled) {
        scaled = new double[n];
        for (int j = 0; j < n; ++j) {
            scaled[j] = in.readDouble();
        }
    } else {
        scaled = null;
    }

    final boolean hasNordsieck = in.readBoolean();
    if (hasNordsieck) {
        nordsieck = (Array2DRowRealMatrix) in.readObject();
    } else {
        nordsieck = null;
    }

    if (hasScaled && hasNordsieck) {
        // we can now set the interpolated time and state
        stateVariation = new double[n];
        setInterpolatedTime(t);
    } else {
        stateVariation = null;
    }

}
 
源代码2 项目: spliceengine   文件: SelfReferenceOperation.java
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    super.readExternal(in);
    this.recursiveUnionReference = (SpliceOperation) in.readObject();
    if(in.readBoolean())
        rowMethodName=in.readUTF();
}
 
源代码3 项目: astor   文件: NordsieckStepInterpolator.java
/** {@inheritDoc} */
@Override
public void readExternal(final ObjectInput in)
    throws IOException, ClassNotFoundException {

    // read the base class
    final double t = readBaseExternal(in);

    // read the local attributes
    scalingH      = in.readDouble();
    referenceTime = in.readDouble();

    final int n = (currentState == null) ? -1 : currentState.length;
    final boolean hasScaled = in.readBoolean();
    if (hasScaled) {
        scaled = new double[n];
        for (int j = 0; j < n; ++j) {
            scaled[j] = in.readDouble();
        }
    } else {
        scaled = null;
    }

    final boolean hasNordsieck = in.readBoolean();
    if (hasNordsieck) {
        nordsieck = (Array2DRowRealMatrix) in.readObject();
    } else {
        nordsieck = null;
    }

    if (hasScaled && hasNordsieck) {
        // we can now set the interpolated time and state
        stateVariation = new double[n];
        setInterpolatedTime(t);
    } else {
        stateVariation = null;
    }

}
 
源代码4 项目: spliceengine   文件: SpliceStddevSamp.java
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    super.readExternal(in);
    if (in.readBoolean()) {
        result = in.readDouble();
    }
}
 
源代码5 项目: jdk8u_jdk   文件: LiveRef.java
public static LiveRef read(ObjectInput in, boolean useNewFormat)
    throws IOException, ClassNotFoundException
{
    Endpoint ep;
    ObjID id;

    // Now read in the endpoint, id, and result flag
    // (need to choose whether or not to read old JDK1.1 endpoint format)
    if (useNewFormat) {
        ep = TCPEndpoint.read(in);
    } else {
        ep = TCPEndpoint.readHostPortFormat(in);
    }
    id = ObjID.read(in);
    boolean isResultStream = in.readBoolean();

    LiveRef ref = new LiveRef(id, ep, false);

    if (in instanceof ConnectionInputStream) {
        ConnectionInputStream stream = (ConnectionInputStream)in;
        // save ref to send "dirty" call after all args/returns
        // have been unmarshaled.
        stream.saveRef(ref);
        if (isResultStream) {
            // set flag in stream indicating that remote objects were
            // unmarshaled.  A DGC ack should be sent by the transport.
            stream.setAckNeeded();
        }
    } else {
        DGCClient.registerRefs(ep, Arrays.asList(new LiveRef[] { ref }));
    }

    return ref;
}
 
源代码6 项目: ignite   文件: MetadataTypeArgs.java
/** {@inheritDoc} */
@Override protected void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundException {
    boolean useName = in.readBoolean();

    if (useName)
        typeName = U.readString(in);
    else
        typeId = in.readInt();
}
 
@Override
public void readExternal(ObjectInput in) throws IOException,
    ClassNotFoundException {
  System.out.println("VersionedHeader.readExternal invoked with " + in);
  if (in instanceof VersionedObjectInput) {
    this.serializedVersion = ((VersionedObjectInput)in).getVersion();
  } else {
    this.serializedVersion = Version.CURRENT;
  }
  in.readBoolean();
  in.readUTF();
}
 
源代码8 项目: gemfirexd-oss   文件: TriggerDescriptor.java
/**
 * Read this object from a stream of stored objects.
 *
 * @param in read this.
 *
 * @exception IOException					thrown on error
 * @exception ClassNotFoundException		thrown on error
 */
public void readExternal(ObjectInput in)
	 throws IOException, ClassNotFoundException
{
	id = (UUID)in.readObject();
	name = (String)in.readObject();
	triggerSchemaId = (UUID)in.readObject();
	triggerTableId = (UUID)in.readObject();
	eventMask = in.readInt();
	isBefore = in.readBoolean();
	isRow = in.readBoolean();
	isEnabled = in.readBoolean();
	whenSPSId = (UUID)in.readObject();
	actionSPSId = (UUID)in.readObject();
	int length = in.readInt();
	if (length != 0)
	{
		referencedCols = new int[length];
		for (int i = 0; i < length; i++)
		{
			referencedCols[i] = in.readInt();
		}
	}
	triggerDefinition = (String)in.readObject();
	referencingOld = in.readBoolean();
	referencingNew = in.readBoolean();
	oldReferencingName = (String)in.readObject();
	newReferencingName = (String)in.readObject();
	
}
 
public void readExternal(ObjectInput in) throws IOException,
                                        ClassNotFoundException {
    super.readExternal( in );
    this.className = ( String ) in.readObject();
    this.expr = ( String ) in.readObject();
    this.typesafe = in.readBoolean();
    this.evaluationContext = in.readObject();
}
 
源代码10 项目: spliceengine   文件: ArrayUtil.java
/**
  Read an array of integers from an ObjectInput. This allocates the
  array.

  @param	in	the ObjectInput.
  @return   the array of integers.

  @exception java.io.IOException The write caused an IOException. 
  */
public static int[] readIntArray(ObjectInput in) throws IOException {
	if (!in.readBoolean())
		return null;
	int length = in.readInt();
	int[] a = new int[length];
	for (int i=0; i<length; i++)
		a[i] = in.readInt();
	return a;
}
 
源代码11 项目: spliceengine   文件: RowCountOperation.java
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    super.readExternal(in);
    source = (SpliceOperation) in.readObject();
    offsetMethodName = readNullableString(in);
    fetchFirstMethodName = readNullableString(in);
    hasJDBCLimitClause = in.readBoolean();
    bypass = in.readBoolean();
}
 
源代码12 项目: ignite   文件: VisorHadoopConfiguration.java
/** {@inheritDoc} */
@Override protected void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundException {
    planner = U.readString(in);
    extExecution = in.readBoolean();
    finishedJobInfoTtl = in.readLong();
    maxParallelTasks = in.readInt();
    maxTaskQueueSize = in.readInt();
    libNames = U.readList(in);
}
 
源代码13 项目: tomee   文件: JNDIResponse.java
@Override
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
    final byte version = in.readByte(); // future use

    final boolean readServer = in.readBoolean();
    if (readServer) {
        server = new ServerMetaData();
        server.setMetaData(metaData);
        server.readExternal(in);
    }

    responseCode = in.readByte();

    switch (responseCode) {
        case ResponseCodes.JNDI_BUSINESS_OBJECT:
        case ResponseCodes.JNDI_OK:
        case ResponseCodes.JNDI_NAMING_EXCEPTION:
        case ResponseCodes.JNDI_RUNTIME_EXCEPTION:
        case ResponseCodes.JNDI_ERROR:
        case ResponseCodes.JNDI_RESOURCE:
            result = in.readObject();
            break;
        case ResponseCodes.JNDI_CONTEXT:
        case ResponseCodes.JNDI_NOT_FOUND:
            break;
        case ResponseCodes.JNDI_EJBHOME:
            final EJBMetaDataImpl m = new EJBMetaDataImpl();
            m.setMetaData(metaData);
            m.readExternal(in);
            result = m;
            break;
        case ResponseCodes.JNDI_DATA_SOURCE:
            final DataSourceMetaData ds = new DataSourceMetaData();
            ds.setMetaData(metaData);
            ds.readExternal(in);
            result = ds;
            break;
        case ResponseCodes.JNDI_INJECTIONS:
            final InjectionMetaData imd = new InjectionMetaData();
            imd.setMetaData(metaData);
            imd.readExternal(in);
            result = imd;
            break;
        case ResponseCodes.JNDI_WEBSERVICE:
            result = in.readObject();
            break;
        case ResponseCodes.JNDI_ENUMERATION:
            final NameClassPairEnumeration ncpe = new NameClassPairEnumeration();
            ncpe.setMetaData(metaData);
            ncpe.readExternal(in);
            result = ncpe;
            break;
        case ResponseCodes.JNDI_REFERENCE:
            result = in.readObject();
            break;
    }
}
 
源代码14 项目: ignite   文件: PlatformStreamReceiverImpl.java
/** {@inheritDoc} */
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    super.readExternal(in);

    keepBinary = in.readBoolean();
}
 
源代码15 项目: reladomo   文件: BooleanUpdateWrapper.java
public void readParameter(ObjectInput in) throws IOException, ClassNotFoundException
{
    this.newValue = in.readBoolean();
}
 
源代码16 项目: kogito-runtimes   文件: NegConstraint.java
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    operator = in.readBoolean();
}
 
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
		this.eliminatedNulls = in.readBoolean();
		this.isNull = in.readBoolean();
		this.sum = (BigDecimal)in.readObject();
}
 
源代码18 项目: ignite   文件: IgfsBlockLocationImpl.java
/** {@inheritDoc} */
@Override public void readExternal(ObjectInput in) throws IOException {
    start = in.readLong();
    len = in.readLong();

    int size;

    if (in.readBoolean()) {
        size = in.readInt();

        nodeIds = new ArrayList<>(size);

        for (int i = 0; i < size; i++)
            nodeIds.add(U.readUuid(in));
    }

    size = in.readInt();

    names = new ArrayList<>(size);

    for (int i = 0; i < size; i++)
        names.add(in.readUTF());

    size = in.readInt();

    hosts = new ArrayList<>(size);

    for (int i = 0; i < size; i++)
        hosts.add(in.readUTF());
}
 
源代码19 项目: library   文件: ConsensusMessage.java
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {

    super.readExternal(in);

    number = in.readInt();
    epoch = in.readInt();
    paxosType = in.readInt();

    int toRead = in.readInt();

    if(toRead != -1) {

        value = new byte[toRead];

        do{

            toRead -= in.read(value, value.length-toRead, toRead);

        } while(toRead > 0);

    }

    boolean asProof = in.readBoolean();
    if (asProof) {
        
        proof = in.readObject();
    }
    
}
 
源代码20 项目: spliceengine   文件: ArrayUtil.java
/**
  Read an array of integers from an ObjectInput. This allocates the
  array.

  @param	in	the ObjectInput.
  @return   the array of integers.

  @exception java.io.IOException The write caused an IOException. 
  */
public static boolean[] readBooleanArray(ObjectInput in) throws IOException {
	int length = in.readInt();
	boolean[] a = new boolean[length];
	for (int i=0; i<length; i++)
		a[i] = in.readBoolean();
	return a;
}