List of usage examples for java.io ObjectOutputStream defaultWriteObject
public void defaultWriteObject() throws IOException
From source file:org.apache.flink.streaming.connectors.kafka.api.persistent.PersistentKafkaSource.java
private void writeObject(ObjectOutputStream out) throws IOException, ClassNotFoundException { out.defaultWriteObject(); out.writeObject(consumerConfig.props().props()); }
From source file:org.hibernate.exception.NestableRuntimeException.java
private void writeObject(ObjectOutputStream oos) throws IOException { Throwable tempCause = cause;// w ww . j a v a2 s. c o m //don't propagate RecognitionException, might be not serializable if (cause instanceof RecognitionException) { cause = null; } oos.defaultWriteObject(); cause = tempCause; }
From source file:gov.nih.nci.caintegrator.application.geneexpression.BoxAndWhiskerCoinPlotRenderer.java
private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtilities.writePaint(this.getArtifactPaint(), stream); }
From source file:nl.strohalm.cyclos.utils.jfreeAsymmetric.AsymmetricStatisticalBarRenderer.java
/** * Provides serialization support.//from w ww .jav a 2 s . c om * * @param stream the output stream. * * @throws IOException if there is an I/O error. */ private void writeObject(final ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtilities.writePaint(errorIndicatorPaint, stream); }
From source file:org.intermine.common.swing.table.GenericTableModel.java
/** * Serialisation method. Checks whether the model objects in <code>rows</code> can be * written and does so if this is possible. * /* w w w . j ava 2s .c o m*/ * @param out The ObjectOutputStream to write to. * * @throws IOException if there is a problem writing the object. * * @serialData If all objects in <code>rows</code> can be serialised, the list is written * to the stream. Otherwise, a <code>null</code> is written and the data of this model * is not written. */ private void writeObject(ObjectOutputStream out) throws IOException { out.defaultWriteObject(); // Strictly speaking, each item in rows may be Serializable but may link to // something else that is not. Really, we should perform a test write of the // list and proceed from there. boolean canSerialize = true; for (T next : rows) { if (next != null) { canSerialize = canSerialize && next instanceof Serializable; } } out.writeObject(canSerialize ? rows : null); }
From source file:it.unimi.di.big.mg4j.document.TRECDocumentCollection.java
private void writeObject(final ObjectOutputStream s) throws IOException { s.defaultWriteObject(); s.writeLong(descriptors.size64());/*w ww.jav a 2s . c om*/ for (TRECDocumentDescriptor descriptor : descriptors) { s.writeInt(descriptor.fileIndex); s.writeLong(descriptor.startMarker); s.writeInt(descriptor.intermediateMarkerDiff); s.writeInt(descriptor.stopMarkerDiff); } }
From source file:ddf.catalog.data.impl.MetacardTypeImpl.java
/** * Serializes this {@link MetacardTypeImpl} instance. * * @param stream the {@link ObjectOutputStream} that contains the object to be serialized * @throws IOException//from w w w . j a v a 2s.c o m * @serialData First, the name is written as a {@code String} by the default Java serialization * implementation, then the number of {@link AttributeDescriptor} objects is written as an ( * {@code int}), followed by all of the {@code AttributeDescriptor} objects in no guaranteed * sequence or order. */ private void writeObject(ObjectOutputStream stream) throws IOException { /* * defaultWriteObject() is invoked for greater flexibility and compatibility. See the * *Serialization Note* in MetacardImpl's class Javadoc. */ stream.defaultWriteObject(); stream.writeInt(descriptors.size()); for (AttributeDescriptor descriptor : descriptors.values()) { stream.writeObject(descriptor); } }
From source file:it.unimi.dsi.util.Properties.java
private void writeObject(final ObjectOutputStream s) throws IOException { s.defaultWriteObject(); try {/*w w w . j av a 2 s . co m*/ save(s); } catch (ConfigurationException e) { throw new RuntimeException(e); } }
From source file:com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl.java
/** * Our own serialization (to handle the weak reference) * @param out the stream to write to//from w w w .j av a 2 s . c o m * @throws IOException in case of error */ private void writeObject(final ObjectOutputStream out) throws IOException { out.defaultWriteObject(); }
From source file:utilities.datastructures.multimap.MyMultiValueMap.java
/** * Write the map out using a custom routine. * /*from www .ja v a 2s . com*/ * @param out * the output stream * @throws IOException * @since 4.0 */ private void writeObject(final ObjectOutputStream out) throws IOException { out.defaultWriteObject(); out.writeObject(this.map); }