List of usage examples for java.io ObjectInput readBoolean
boolean readBoolean() throws IOException;
From source file:com.sentaroh.android.TextFileBrowser.ViewedFileListAdapter.java
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { file_path = in.readUTF();/*from ww w . j a va2s . co m*/ file_name = in.readUTF(); listViewPos[0] = in.readInt(); listViewPos[1] = in.readInt(); copyFrom = in.readInt(); copyTo = in.readInt(); horizontalPos = in.readInt(); findResultPos = in.readInt(); findPosIsValid = in.readBoolean(); searchEnabled = in.readBoolean(); searchString = in.readUTF(); searchCaseSensitive = in.readBoolean(); lineBreak = in.readInt(); browseMode = in.readInt(); showLineNo = in.readBoolean(); encodeName = in.readUTF(); viewerParmsInitRequired = in.readBoolean(); viewerParmsRestoreRequired = in.readBoolean(); }
From source file:xbird.xquery.dm.value.sequence.MarshalledSequence.java
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { final Type type = (Type) in.readObject(); this._type = type; final boolean redirectable = in.readBoolean(); if (redirectable) { this._redirectable = true; this._entity = (Sequence<Item>) in.readObject(); } else {/* ww w .ja v a 2 s.co m*/ this._redirectable = false; // just for readability final boolean isDecodedSeq = in.readBoolean(); if (isDecodedSeq) { IncrDecodedSequnece entity = IncrDecodedSequnece.readFrom(in); entity._type = type; this._entity = entity; } else { final boolean piped = in.readBoolean(); final XQEventDecoder decoder; if (piped) { this._piped = true; decoder = pipedIn(in, _reaccessable); } else { this._piped = false; decoder = bulkIn(in); // This is required for nested Object serialization/deserialization } if (DEBUG_DESER_SPEED) { try { this._entity = decoder.decode(); } catch (XQueryException e) { throw new IllegalStateException("failed decoding", e); } } else { final IncrDecodedSequnece entity = new IncrDecodedSequnece(decoder, type); entity._piped = piped; this._entity = entity; } } } }
From source file:gridool.dht.ops.AddOperation.java
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { this.idxName = IOUtils.readString(in); final int size = in.readInt(); final byte[][] lkeys = new byte[size][]; final byte[][] lvalues = new byte[size][]; for (int i = 0; i < size; i++) { lkeys[i] = IOUtils.readBytes(in); lvalues[i] = IOUtils.readBytes(in); }//from w w w. ja v a2s. c o m this.keys = new ImmutableArrayList<byte[]>(lkeys); this.values = new ImmutableArrayList<byte[]>(lvalues); this.async = in.readBoolean(); }
From source file:StringMap.java
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, ClassNotFoundException { boolean ic = in.readBoolean(); HashMap map = (HashMap) in.readObject(); setIgnoreCase(ic);/*w w w .j a va 2 s. c o m*/ this.putAll(map); }
From source file:com.splicemachine.db.iapi.types.UserType.java
/** * @see java.io.Externalizable#readExternal * * @exception IOException Thrown on error reading the object * @exception ClassNotFoundException Thrown if the class of the object * is not found *//* w ww . jav a2 s .c om*/ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { boolean readIsNull = in.readBoolean(); if (!readIsNull) { /* RESOLVE: Sanity check for right class */ value = in.readObject(); isNull = evaluateNull(); } else { restoreToNull(); } }
From source file:BeanContainer.java
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { setDigital(in.readBoolean()); setBackground((Color) in.readObject()); setForeground((Color) in.readObject()); setPreferredSize((Dimension) in.readObject()); }/*from w ww . j a v a2 s .com*/
From source file:com.splicemachine.derby.impl.sql.execute.operations.scanner.TableScannerBuilder.java
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { template = (ExecRow) in.readObject(); scan = readScan(in);//from w w w . java2s.c o m if (in.readBoolean()) { rowColumnMap = new int[in.readInt()]; for (int i = 0; i < rowColumnMap.length; ++i) { rowColumnMap[i] = in.readInt(); } } txn = readTxn(in); keyColumnEncodingOrder = ArrayUtil.readIntArray(in); if (in.readBoolean()) { keyColumnSortOrder = ArrayUtil.readBooleanArray(in); } keyColumnTypes = ArrayUtil.readIntArray(in); if (in.readBoolean()) { keyDecodingMap = ArrayUtil.readIntArray(in); } if (in.readBoolean()) { baseColumnMap = ArrayUtil.readIntArray(in); } accessedKeys = (FormatableBitSet) in.readObject(); reuseRowLocation = in.readBoolean(); oneSplitPerRegion = in.readBoolean(); if (in.readBoolean()) indexName = in.readUTF(); if (in.readBoolean()) tableVersion = in.readUTF(); if (in.readBoolean()) { int n = in.readInt(); fieldLengths = new int[n]; for (int i = 0; i < n; ++i) { fieldLengths[i] = in.readInt(); } n = in.readInt(); columnPositionMap = new int[n]; for (int i = 0; i < n; ++i) { columnPositionMap[i] = in.readInt(); } baseTableConglomId = in.readLong(); } demarcationPoint = in.readLong(); if (in.readBoolean()) optionalProbeValue = (DataValueDescriptor) in.readObject(); pin = in.readBoolean(); if (in.readBoolean()) delimited = in.readUTF(); if (in.readBoolean()) escaped = in.readUTF(); if (in.readBoolean()) lines = in.readUTF(); if (in.readBoolean()) storedAs = in.readUTF(); if (in.readBoolean()) location = in.readUTF(); }
From source file:com.github.naoghuman.abclist.model.Link.java
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { this.setId(in.readLong()); this.setGenerationTime(in.readLong()); this.setAlias(String.valueOf(in.readObject())); // TODO (de-/encrypt for db) this.setDescription(String.valueOf(in.readObject())); // TODO (de-/encrypt for db) this.setUrl(String.valueOf(in.readObject())); // TODO (de-/encrypt for db) this.setImage(String.valueOf(in.readObject())); this.setFavorite(in.readBoolean()); }
From source file:es.udc.gii.common.eaf.algorithm.population.Individual.java
/** * This method is called whenever an instance of this class has to be * de-serialized.<p>//from w w w .j a v a 2 s.c om * * It sets the values of Individual#getSerializeEvalResults and * Individual#getSerializeGenotype accordingly to the information received * so that subclasses can rely on them to know what kind of information is * to be read.<p> * * Subclasses should override this method if they introduce new attibutes. * Remember to call <code>super.readExternal()</code> in order to * be sure that the state of the parent class is de-serialized and the values * of Individual#getSerializeEvalResults and Individual#getSerializeGenotype * contain the right information. * * @param in - DataInput from which the bytes are read. * @throws java.io.IOException * @throws java.lang.ClassNotFoundException */ @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { /* Retrieve the type of information comming in */ boolean evals = in.readBoolean(); boolean genotype = in.readBoolean(); this.serializeEvalResults = evals; this.serializeGenotype = genotype; /* Read the evaluation results, if present */ if (evals) { /* Read number of violated constraints */ this.violatedConstraints = in.readInt(); /* Read the fitness value */ this.fitness = in.readDouble(); /* Read the number of objectives (-1 means no objective values) */ int nObjs = in.readInt(); if (nObjs == -1) { this.objectives = null; } else { /* Read all objective values */ this.objectives = new ArrayList<Double>(nObjs); for (int i = 0; i < nObjs; i++) { this.objectives.add(in.readDouble()); } } /* Read the number of constraints (-1 means no constraint values) */ int nConstr = in.readInt(); if (nConstr == -1) { this.constraints = null; } else { /* Read all constraint values */ this.constraints = new ArrayList<Double>(nConstr); for (int i = 0; i < nConstr; i++) { this.constraints.add(in.readDouble()); } } } /* Read the genotype information, if present */ if (genotype) { int nChroms = in.readInt(); if (nChroms == -1) { this.chromosomes = null; } else { /* Read all the chromosomes */ this.chromosomes = new DoubleArray[nChroms]; for (int i = 0; i < nChroms; i++) { int nGenes = in.readInt(); this.chromosomes[i] = new ResizableDoubleArray(nGenes); for (int j = 0; j < nGenes; j++) { this.chromosomes[i].addElement(in.readDouble()); } } } } }
From source file:xbird.xquery.expr.path.PathExpr.java
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { final int numSteps = in.readInt(); final ArrayList<XQExpression> steps = new ArrayList<XQExpression>(numSteps); for (int i = 0; i < numSteps; i++) { XQExpression step = (XQExpression) in.readObject(); steps.add(step);/*ww w . j a v a 2 s. c o m*/ } this._steps = steps; final boolean hasAnalyzedExpr = in.readBoolean(); if (hasAnalyzedExpr) { this._analyzedExpr = (XQExpression) in.readObject(); } }