Example usage for java.io ObjectInput readBoolean

List of usage examples for java.io ObjectInput readBoolean

Introduction

In this page you can find the example usage for java.io ObjectInput readBoolean.

Prototype

boolean readBoolean() throws IOException;

Source Link

Document

Reads one input byte and returns true if that byte is nonzero, false if that byte is zero.

Usage

From source file:net.openhft.chronicle.wire.benchmarks.Data.java

@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    setPrice(in.readDouble());/*from   w w w . java  2 s .  c  o  m*/
    setLongInt(in.readLong());
    setSmallInt(in.readInt());
    setFlag(in.readBoolean());
    setSide((Side) in.readObject());
    setText((String) in.readObject());
}

From source file:xbird.util.nio.RemoteMemoryMappedFile.java

public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    this._bigEndian = in.readBoolean();
    this._pageSize = in.readInt();
    this._maxBulkFetchSize = _pageSize * (MemoryMappedDocumentTable.CACHED_PAGES / 4);
    this._rcvbuf = ByteBuffer.allocateDirect(_pageSize);
    String host = IOUtils.readString(in);
    int port = in.readInt();
    this._sockAddr = new InetSocketAddress(host, port);
    this._filePath = IOUtils.readString(in);
    this._fileIdentifier = generateFileIdentifier(_sockAddr, _filePath);
}

From source file:com.splicemachine.orc.predicate.SpliceORCPredicate.java

@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    baseColumnMap = ArrayUtil.readIntArray(in);
    if (in.readBoolean()) {
        qualifiers = new Qualifier[in.readInt()][];
        qualifiers[0] = new Qualifier[in.readInt()];
        for (int i = 0; i < qualifiers[0].length; i++) {
            qualifiers[0][i] = (Qualifier) in.readObject();
        }/*from   w  ww.  j  a v a  2 s  .c o  m*/
        for (int and_idx = 1; and_idx < qualifiers.length; and_idx++) {
            qualifiers[and_idx] = new Qualifier[in.readInt()];
            for (int or_idx = 0; or_idx < qualifiers[and_idx].length; or_idx++) {
                qualifiers[and_idx][or_idx] = (Qualifier) in.readObject();
            }
        }
    }
    structType = (StructType) StructType.fromJson((String) in.readObject());
}

From source file:com.github.naoghuman.abclist.model.ExerciseTerm.java

@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    this.setId(in.readLong());
    this.setExerciseId(in.readLong());
    this.setTermId(in.readLong());
    this.setMarkAsWrong(in.readBoolean());
}

From source file:org.ejbca.core.model.approval.approvalrequests.EditEndEntityApprovalRequest.java

public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    super.readExternal(in);
    int version = in.readInt();
    if (version == 1) {
        newuserdata = (EndEntityInformation) in.readObject();
        clearpwd = in.readBoolean();
        orguserdata = (EndEntityInformation) in.readObject();
    }//from   w w  w .j a  v  a 2s .  c o m
}

From source file:xbird.xquery.expr.opt.ShippedVariable.java

@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    this._local = false;
    this._type = (Type) in.readObject();
    this._varName = (QualifiedName) in.readObject();
    this._identifier = in.readInt();

    final boolean hasResult = in.readBoolean();
    if (hasResult) {
        final boolean isRemoteSeq = in.readBoolean();
        if (isRemoteSeq) {
            this._result = RemoteSequence.readFrom(in);
        } else {/* w  ww.  j av a 2 s.  c  om*/
            final StopWatch sw = new StopWatch("Elapsed time for decoding `$" + getName() + '\'');
            final XQEventDecoder decoder = new XQEventDecoder(in);
            try {
                this._result = decoder.decode();
            } catch (XQueryException xqe) {
                throw new IllegalStateException("failed decoding `$" + getName() + '\'', xqe);
            } catch (Throwable e) {
                throw new IllegalStateException("failed decoding `$" + getName() + '\'', e);
            }
            if (LOG.isInfoEnabled()) {
                LOG.info(sw);
            }
        }
    } else {
        this._value = (XQExpression) in.readObject();
    }
}

From source file:gridool.dht.ops.RemoveOperation.java

public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    this.idxName = IOUtils.readString(in);
    int size = in.readInt();
    final byte[][] ary = new byte[size][];
    for (int i = 0; i < size; i++) {
        ary[i] = IOUtils.readBytes(in);/*w w  w. ja v a2  s . co  m*/
    }
    this.keys = new ImmutableArrayList<byte[]>(ary);
    this.async = in.readBoolean();
}

From source file:de.pro.dbw.file.dream.api.DreamModel.java

@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    this.setId(in.readLong());
    this.setGenerationTime(in.readLong());
    this.setFavorite(in.readBoolean());
    this.setFavoriteReason(String.valueOf(in.readObject()));
    this.setDescription(String.valueOf(in.readObject()));
    this.setText(String.valueOf(in.readObject()));
    this.setTitle(String.valueOf(in.readObject()));
}

From source file:org.apache.openjpa.datacache.QueryKey.java

public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    _candidateClassName = (String) in.readObject();
    _subclasses = in.readBoolean();
    _accessPathClassNames = (Set<String>) in.readObject();
    _query = (String) in.readObject();
    _ignoreChanges = in.readBoolean();/* w ww.  j  a va2s . c  o  m*/
    _params = (Map<Object, Object>) in.readObject();
    _rangeStart = in.readLong();
    _rangeEnd = in.readLong();
    _timeout = in.readInt();
}

From source file:com.github.naoghuman.abclist.model.Exercise.java

@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    this.setId(in.readLong());
    this.setTopicId(in.readLong());
    this.setGenerationTime(in.readLong());
    this.setFinishedTime(in.readLong());
    this.setConsolidated(in.readBoolean());
    this.setReady(in.readBoolean());
    this.setChoosenTime(String.valueOf(in.readObject()));
}