List of usage examples for java.io ObjectOutput writeBoolean
void writeBoolean(boolean v) throws IOException;
boolean
value to this output stream. From source file:com.github.naoghuman.abclist.model.Exercise.java
@Override public void writeExternal(ObjectOutput out) throws IOException { out.writeLong(this.getId()); out.writeLong(this.getTopicId()); out.writeLong(this.getGenerationTime()); out.writeLong(this.getFinishedTime()); out.writeBoolean(this.isConsolidated()); out.writeBoolean(this.isReady()); out.writeObject(this.getChoosenTime()); }
From source file:com.sentaroh.android.TextFileBrowser.ViewedFileListAdapter.java
@Override public void writeExternal(ObjectOutput out) throws IOException { out.writeUTF(file_path);// www.java 2 s . c o m out.writeUTF(file_name); out.writeInt(listViewPos[0]); out.writeInt(listViewPos[1]); out.writeInt(copyFrom); out.writeInt(copyTo); out.writeInt(horizontalPos); out.writeInt(findResultPos); out.writeBoolean(findPosIsValid); out.writeBoolean(searchEnabled); out.writeUTF(searchString); out.writeBoolean(searchCaseSensitive); out.writeInt(lineBreak); out.writeInt(browseMode); out.writeBoolean(showLineNo); out.writeUTF(encodeName); out.writeBoolean(viewerParmsInitRequired); out.writeBoolean(viewerParmsRestoreRequired); }
From source file:com.splicemachine.derby.impl.sql.execute.operations.scanner.TableScannerBuilder.java
private void writeNullableString(String nullableString, ObjectOutput out) throws IOException { out.writeBoolean(nullableString != null); if (nullableString != null) out.writeUTF(nullableString);/*w ww. j a v a2 s . co m*/ }
From source file:com.splicemachine.db.iapi.types.UserType.java
/** @exception IOException error writing data //from www. j av a 2 s . com */ public void writeExternal(ObjectOutput out) throws IOException { out.writeBoolean(isNull()); if (!isNull()) out.writeObject(value); }
From source file:xbird.xquery.dm.value.sequence.MarshalledSequence.java
public void writeExternal(ObjectOutput out) throws IOException { out.writeObject(_type);/*from ww w . j av a2 s . c om*/ final boolean reaccessable = _reaccessable; final boolean redirectable = _redirectable; out.writeBoolean(redirectable); if (redirectable) { out.writeObject(_entity); } else { if (_entity instanceof IncrDecodedSequnece) { out.writeBoolean(true); IncrDecodedSequnece incr = ((IncrDecodedSequnece) _entity); incr._reaccessable = reaccessable; incr.writeExternal(out); } else { out.writeBoolean(false); if (_piped) { out.writeBoolean(true); pipedOut(out, _entity, _remotePaging); } else { out.writeBoolean(false); bulkOut(out, _entity, _remotePaging); } } } if (!reaccessable) { this._entity = null; } }
From source file:StringMap.java
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException { HashMap map = new HashMap(this); out.writeBoolean(_ignoreCase); out.writeObject(map);//ww w. j av a2 s . c om }
From source file:com.github.naoghuman.abclist.model.Link.java
@Override public void writeExternal(ObjectOutput out) throws IOException { out.writeLong(this.getId()); out.writeLong(this.getGenerationTime()); out.writeObject(this.getAlias()); // TODO (de-/encrypt for db) out.writeObject(this.getDescription()); // TODO (de-/encrypt for db) out.writeObject(this.getUrl()); // TODO (de-/encrypt for db) out.writeObject(this.getImage()); out.writeBoolean(this.getFavorite()); }
From source file:BeanContainer.java
public void writeExternal(ObjectOutput out) throws IOException { out.writeBoolean(m_digital); out.writeObject(getBackground()); out.writeObject(getForeground()); out.writeObject(getPreferredSize()); }/*ww w .ja v a 2 s . co m*/
From source file:com.splicemachine.derby.impl.sql.execute.operations.scanner.TableScannerBuilder.java
@Override public void writeExternal(ObjectOutput out) throws IOException { out.writeObject(template);// ww w . ja va 2 s.co m writeScan(out); out.writeBoolean(rowColumnMap != null); if (rowColumnMap != null) { out.writeInt(rowColumnMap.length); //noinspection ForLoopReplaceableByForEach for (int i = 0; i < rowColumnMap.length; ++i) { out.writeInt(rowColumnMap[i]); } } writeTxn(out); ArrayUtil.writeIntArray(out, keyColumnEncodingOrder); out.writeBoolean(keyColumnSortOrder != null); if (keyColumnSortOrder != null) { ArrayUtil.writeBooleanArray(out, keyColumnSortOrder); } ArrayUtil.writeIntArray(out, keyColumnTypes); out.writeBoolean(keyDecodingMap != null); if (keyDecodingMap != null) { ArrayUtil.writeIntArray(out, keyDecodingMap); } out.writeBoolean(baseColumnMap != null); if (baseColumnMap != null) { ArrayUtil.writeIntArray(out, baseColumnMap); } out.writeObject(accessedKeys); out.writeBoolean(reuseRowLocation); out.writeBoolean(oneSplitPerRegion); out.writeBoolean(indexName != null); if (indexName != null) out.writeUTF(indexName); out.writeBoolean(tableVersion != null); if (tableVersion != null) out.writeUTF(tableVersion); out.writeBoolean(fieldLengths != null); if (fieldLengths != null) { out.writeInt(fieldLengths.length); //noinspection ForLoopReplaceableByForEach for (int i = 0; i < fieldLengths.length; ++i) { out.writeInt(fieldLengths[i]); } out.writeInt(columnPositionMap.length); //noinspection ForLoopReplaceableByForEach for (int i = 0; i < columnPositionMap.length; ++i) { out.writeInt(columnPositionMap[i]); } out.writeLong(baseTableConglomId); } out.writeLong(demarcationPoint); out.writeBoolean(optionalProbeValue != null); if (optionalProbeValue != null) out.writeObject(optionalProbeValue); out.writeBoolean(pin); writeNullableString(delimited, out); writeNullableString(escaped, out); writeNullableString(lines, out); writeNullableString(storedAs, out); writeNullableString(location, out); }
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 serialized.<p> * /*from w ww. j a v a2 s . c o m*/ * It might write to the output <code>out</code> the evaluation results * or the genotype information or both, deppending on the value of * Individual#getSerializeEvalResults and Individual#getSerializeGenotype, * which are always writen at the beginning of the output to know later what * type of information is contained in the data.<p> * * Subclasses should override this method if they introduce new attibutes. * Remember to call <code>super.writeExternal()</code> in order to * be sure that the state of the parent class is serialized. * * @param out - DataOutput to write the serialized bytes to. * @throws java.io.IOException */ @Override public void writeExternal(ObjectOutput out) throws IOException { /* Phenotype serialized? */ out.writeBoolean(this.serializeEvalResults); /* Genotype serialized? */ out.writeBoolean(this.serializeGenotype); if (this.serializeEvalResults) { /* Serialize number of violated constraints */ out.writeInt(this.violatedConstraints); /* Serialize fitness */ out.writeDouble(this.fitness); /* Serialize objective values */ if (this.objectives == null) { out.writeInt(-1); } else { out.writeInt(this.objectives.size()); for (Double d : this.objectives) { out.writeDouble(d.doubleValue()); } } /* Serialize constraint values */ if (this.constraints == null) { out.writeInt(-1); } else { out.writeInt(this.constraints.size()); for (Double d : this.constraints) { out.writeDouble(d.doubleValue()); } } } if (this.serializeGenotype) { /* Serialize the chromosomes */ if (this.chromosomes == null) { out.writeInt(-1); } else { out.writeInt(this.chromosomes.length); for (int i = 0; i < this.chromosomes.length; i++) { int genes = this.chromosomes[i].getNumElements(); out.writeInt(genes); for (int j = 0; j < genes; j++) { out.writeDouble(this.chromosomes[i].getElement(j)); } } } } }