List of usage examples for java.io ObjectInputStream defaultReadObject
public void defaultReadObject() throws IOException, ClassNotFoundException
From source file:it.scoppelletti.programmerpower.wui.DefaultActivity.java
/** * Deserializza l’oggetto.//from www.j a va 2s . c om * * @param in Flusso di lettura. */ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { int i, n; String catg; in.defaultReadObject(); try { if (Strings.isNullOrEmpty(myTitle)) { throw new PropertyNotSetException(getClass().getName(), "title"); } if (Strings.isNullOrEmpty(myActivityUrl)) { throw new PropertyNotSetException(getClass().getName(), "activityURL"); } if (Strings.isNullOrEmpty(myIconUrl)) { throw new PropertyNotSetException(getClass().getName(), "iconURL"); } n = in.readInt(); myCategories = new HashSet<String>(1); for (i = 0; i < n; i++) { catg = (String) in.readObject(); myCategories.add(catg); } } catch (Exception ex) { throw new DeserializeException(ex); } }
From source file:net.sf.fspdfs.chartthemes.spring.ScaledDialPointer.java
/** * Provides serialization support.//from w ww. j a va 2s. c o m * * @param stream the input stream. * * @throws IOException if there is an I/O error. * @throws ClassNotFoundException if there is a classpath problem. */ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); this.fillPaint = SerialUtilities.readPaint(stream); }
From source file:org.fhcrc.cpl.toolbox.datastructure.BoundMap.java
/** Magic method for deserialization */ private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); initialize(_bean.getClass());/* ww w . ja v a 2 s. c o m*/ }
From source file:org.intermine.install.project.event.ProjectListenerSupport.java
/** * Deserialization method.//from w ww . j av a 2 s . co m * * @serialData Recreates the transient logger. * * @param in The deserializing ObjectInputStream. * * @throws IOException if there is an I/O problem. * @throws ClassNotFoundException if there is a missing class. */ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); logger = LogFactory.getLog(eventSource.getClass()); }
From source file:org.pentaho.reporting.engine.classic.core.function.TotalItemMaxFunction.java
/** * Helper function for the serialization. * * @param in the input stream./*from w ww . ja v a 2s . co m*/ * @throws IOException if an IO error occured. * @throws ClassNotFoundException if a required class could not be found. */ private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); stateSequence = new StateSequence<>(); }
From source file:org.springframework.aop.support.AbstractRegexpMethodPointcut.java
private void readObject(ObjectInputStream ois) throws IOException { // Rely on default serialization, just initialize state after deserialization. try {/* w ww . j a va 2s . co m*/ ois.defaultReadObject(); } catch (ClassNotFoundException ex) { throw new AspectException("Failed to deserialize AOP regular expression pointcut: " + "Check that the Spring AOP libraries are available on the client side. " + ex); } // initialize transient fields this.logger = LogFactory.getLog(getClass()); // ask subclass to reinitialize try { initPatternRepresentation(this.patterns); } catch (Throwable ex) { throw new AspectException("Failed to deserialize AOP regular expression pointcut: " + "Check that the necessary regular expression libraries are available on the client side. " + ex); } }
From source file:org.marketcetera.util.log.I18NMessageProvider.java
/** * Java deserialization. Reads a receiver instance from the given * stream./*from ww w .j a v a2 s . c om*/ * * @param in The stream. * * @throws IOException Per serialization spec. * @throws ClassNotFoundException Per serialization spec. */ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); try { init(null); } catch (MessageNotFoundException ex) { throw new IOException(Messages.MESSAGE_FILE_NOT_FOUND.getText(getProviderId(), getBaseName()), ex); } }
From source file:com.opengamma.engine.value.ValueRequirement.java
private void readObject(final ObjectInputStream in) throws Exception { in.defaultReadObject(); // Serialization loses the "intern" nature of the string _valueName = ValueRequirement.getInterned(_valueName); }
From source file:net.sf.jasperreports.engine.JRImageRenderer.java
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_4_6_0) { imageTypeValue = ImageTypeEnum.getByValue(imageType); }// w ww . ja v a2 s . com }
From source file:org.jfree.experimental.chart.plot.dial.DialBackground.java
/** * Provides serialization support.//from w w w . ja va2s .co m * * @param stream the input stream. * * @throws IOException if there is an I/O error. * @throws ClassNotFoundException if there is a classpath problem. */ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); this.paint = SerialUtilities.readPaint(stream); }