当前位置: 首页>>代码示例>>Java>>正文


Java ObjectInput.readBoolean方法代码示例

本文整理汇总了Java中java.io.ObjectInput.readBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectInput.readBoolean方法的具体用法?Java ObjectInput.readBoolean怎么用?Java ObjectInput.readBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.io.ObjectInput的用法示例。


在下文中一共展示了ObjectInput.readBoolean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
	super.readExternal(in);
	
	iStudentId = in.readLong();
	iConfigId = in.readLong();
	
	iSectionIds.clear();
	int nrSections = in.readInt();
	for (int i = 0; i < nrSections; i++)
		iSectionIds.add(in.readLong());
	
	iTimeStamp = (in.readBoolean() ? new Date(in.readLong()) : null);
	iApproval = (in.readBoolean() ? new XApproval(in) : null);
	iReservation = (in.readBoolean() ? new XReservationId(in) : null);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:17,代码来源:XEnrollment.java

示例2: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
/**
 * @see java.io.Externalizable#readExternal(ObjectInput)
 */
@Override
public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
{
    // The operation
    operation = ModificationOperation.getOperation( in.readInt() );

    // The EntryAttribute if we have some
    boolean hasAttribute = in.readBoolean();

    if ( hasAttribute )
    {
        attribute = new DefaultAttribute();
        attribute.readExternal( in );
    }
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:19,代码来源:DefaultModification.java

示例3: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  boolean hasBuffer = in.readBoolean();
  if (hasBuffer) {
    int capacity = in.readInt();
    int limit = in.readInt();
    int position = in.readInt();
    byte[] bytes = new byte[capacity];
    int bytesRead = in.read(bytes);
    if (bytesRead != capacity) {
      throw new IOException(
          "Expected to read " + capacity + " bytes but only read " + bytesRead + " bytes.");
    }
    setBuffer(ByteBuffer.wrap(bytes, position, limit - position));
  } else {
    this.buffer = null;
  }
}
 
开发者ID:ampool,项目名称:monarch,代码行数:18,代码来源:ByteBufferInputStream.java

示例4: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
	iUniqueId = in.readLong();
	iInstructionalType = (String)in.readObject();
	iName = (String)in.readObject();
	
	int nrSections = in.readInt();
	iSections.clear();
	for (int i = 0; i < nrSections; i++)
		iSections.add(new XSection(in));
	
	iConfigId = in.readLong();
	iParentId = in.readLong();
	if (iParentId < 0) iParentId = null;
	
	iCredit = (in.readBoolean() ? new XCredit(in) : null);
	
	iAllowOverlap = in.readBoolean();
	
	int nrCredits = in.readInt();
	iCreditByCourse.clear();
	for (int i = 0; i < nrCredits; i++)
		iCreditByCourse.put(in.readLong(), new XCredit(in));
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:25,代码来源:XSubpart.java

示例5: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   	super.readExternal(in);
   	iExpirationDate = (in.readBoolean() ? new Date(in.readLong()) : null);
   	
   	int nrConfigs = in.readInt();
   	iConfigs.clear();
   	for (int i = 0; i < nrConfigs; i++)
   		iConfigs.add(in.readLong());
   	
   	int nrSubparts = in.readInt();
   	iSections.clear(); 
   	for (int i = 0; i < nrSubparts; i++) {
   		Set<Long> sections = new HashSet<Long>();
   		iSections.put(in.readLong(), sections);
   		int nrSection = in.readInt();
   		for (int j = 0; j < nrSection; j++) {
   			sections.add(in.readLong());
   		}
   	}
   	iLimitCap = in.readInt();
   	iRestrictivity = in.readDouble();
   	iPriority = in.readInt();
   	iFlags = in.readInt();
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:26,代码来源:XReservation.java

示例6: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
public void readExternal(ObjectInput in)
    throws IOException, ClassNotFoundException
{
    z = in.readBoolean();
    b = in.readByte();
    c = in.readChar();
    s = in.readShort();
    i = in.readInt();
    f = in.readFloat();
    j = in.readLong();
    d = in.readDouble();
    str = (String) in.readObject();
    parent = in.readObject();
    left = in.readObject();
    right = in.readObject();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:ExternObjTrees.java

示例7: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    super.readExternal(in);

    int offset;

    Object firstObject = in.readObject();

    // New deserialization that uses Env environment,
    // and which could be null(!) see writeExternal.
    if (firstObject instanceof CloneableOpenSupport.Env) {
        CloneableOpenSupport.Env env = (CloneableOpenSupport.Env) firstObject;
        CloneableOpenSupport os = env.findCloneableOpenSupport();
        support = (CloneableEditorSupport) os;
    }

    // load cursor position
    offset = ((Integer) in.readObject()).intValue();

    if (!discard()) {
        cursorPosition = offset;
    }

    updateName();
    componentCreated = true;
    if (in.available() > 0) {
        boolean associate = in.readBoolean();
        if (associate && support != null) {
            associateLookup(support.getLookup());
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:33,代码来源:CloneableEditor.java

示例8: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
	iUniqueId = in.readLong();
	iExternalId = (String)in.readObject();
	iName = (String)in.readObject();
	iEmail = (String)in.readObject();
	iAllowOverlap = in.readBoolean();
	iDisplay = in.readBoolean();
	iInstructing = in.readBoolean();
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:11,代码来源:XInstructor.java

示例9: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    rows = in.readInt();
    cols = in.readInt();
    seed = in.readInt();
    fastHash = in.readBoolean();
}
 
开发者ID:Luodian,项目名称:Higher-Cloud-Computing-Project,代码行数:8,代码来源:RandomMatrixStorage.java

示例10: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    sto = (VectorStorage)in.readObject();
    meta = (Map<String, Object>)in.readObject();
    guid = (IgniteUuid)in.readObject();
    readOnly = in.readBoolean();
}
 
开发者ID:Luodian,项目名称:Higher-Cloud-Computing-Project,代码行数:9,代码来源:AbstractVector.java

示例11: read

import java.io.ObjectInput; //导入方法依赖的package包/类
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;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:35,代码来源:LiveRef.java

示例12: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    long term = in.readLong();
    boolean voteGranted = in.readBoolean();

    requestVoteReply = new RequestVoteReply(term, voteGranted);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:8,代码来源:RequestVoteReply.java

示例13: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    short raftVersion = in.readShort();
    long term = in.readLong();
    String followerId = (String) in.readObject();
    boolean success = in.readBoolean();
    long logLastIndex = in.readLong();
    long logLastTerm = in.readLong();
    short payloadVersion = in.readShort();
    boolean forceInstallSnapshot = in.readBoolean();

    appendEntriesReply = new AppendEntriesReply(followerId, term, success, logLastIndex, logLastTerm,
            payloadVersion, forceInstallSnapshot, raftVersion);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:15,代码来源:AppendEntriesReply.java

示例14: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
/** Deserialize this property sheet. */
@Override
public void readExternal (ObjectInput in)
throws IOException, ClassNotFoundException {
    try {
        super.readExternal(in);
    } catch (SafeException se) {
        // ignore--we really do not care about the explorer manager that much
        //System.err.println("ignoring a SafeException: " + se.getLocalizedMessage ());
    }
    Object obj = in.readObject ();

    if (obj instanceof NbMarshalledObject || obj instanceof ExplorerManager) {
        // old version read the Boolean
        global = ((Boolean)in.readObject()).booleanValue();
    } else {
        Node[] ns;

        if (obj == null) {
            // handles can also be null for global 
            // property sheet
            ns = TopComponent.getRegistry().getActivatedNodes();
        } else {
            // new version, first read the nodes and then the global boolean
            Node.Handle[] arr = (Node.Handle[])obj;

            try {
                ns = NodeOp.fromHandles (arr);
            } catch (IOException ex) {
                Exceptions.attachLocalizedMessage(ex,
                                                  NbBundle.getBundle(NbSheet.class).getString("EXC_CannotLoadNodes"));
                Logger.getLogger(NbSheet.class.getName()).log(Level.WARNING, null, ex);
                ns = new Node[0];
            }
        }

        global = in.readBoolean ();

        setNodes(ns, true, "readExternal"); // NOI18N
    }

    /*
          if (obj instanceof Boolean) {
            global = (Boolean)in.readObject ()

          global = ((Boolean)in.readObject()).booleanValue();
    /*
          // start global listening if needed, but wait until
          // deserialization is done (ExplorerManager is uses
          // post-deserialization validating too, so we are forced
          // to use it)
          ((ObjectInputStream)in).registerValidation(
            new ObjectInputValidation () {
              public void validateObject () {
                updateGlobalListening(false);
              }
            }, 0
          );
    */
    // JST: I guess we are not and moreover the type casting is really ugly
    //      updateGlobalListening (global);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:63,代码来源:NbSheet.java

示例15: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
@Override
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
    super.readExternal(in);
    exists = in.readBoolean();
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:6,代码来源:ExistsTransactionSuccessProxyV1.java


注:本文中的java.io.ObjectInput.readBoolean方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。