本文整理汇总了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);
}
示例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 );
}
}
示例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;
}
}
示例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));
}
示例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();
}
示例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();
}
示例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());
}
}
}
示例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();
}
示例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();
}
示例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();
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例15: readExternal
import java.io.ObjectInput; //导入方法依赖的package包/类
@Override
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
super.readExternal(in);
exists = in.readBoolean();
}