List of usage examples for java.io ObjectInputStream defaultReadObject
public void defaultReadObject() throws IOException, ClassNotFoundException
From source file:dk.netarkivet.common.utils.batch.ChecksumJob.java
/** * Invoke default method for deserializing object, and reinitialise the * logger./*from w ww . j av a 2 s . c om*/ * @param s the InputStream */ private void readObject(ObjectInputStream s) { try { s.defaultReadObject(); } catch (Exception e) { throw new IOFailure("Unexpected error during deserialization", e); } log = LogFactory.getLog(getClass().getName()); }
From source file:org.nuclos.common.collect.collectable.searchcondition.ReferencingCollectableSearchCondition.java
private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { ois.defaultReadObject(); // CollectableEntityField is not serializable: this.clctefReferencing = (CollectableEntityField) ois.readObject(); }
From source file:com.hp.autonomy.hod.client.api.resource.ResourceName.java
private void readObject(final ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { objectInputStream.defaultReadObject(); validate(domain, name);/*from ww w . ja v a 2 s . co m*/ }
From source file:com.phoenixst.collections.FilteredCollection.java
private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException { in.defaultReadObject(); if (delegate == null) { throw new InvalidObjectException("Wrapped Collection is null."); }//from www .j a v a2s . c om if (predicate == null) { throw new InvalidObjectException("Predicate is null."); } }
From source file:it.unibo.alchemist.language.protelis.MethodCall.java
private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); final Class<?> declaringClass = (Class<?>) in.readObject(); final String methodName = in.readUTF(); final Class<?>[] parameterTypes = (Class<?>[]) in.readObject(); try {// w ww . j a v a 2s . c o m method = declaringClass.getMethod(methodName, parameterTypes); } catch (Exception e) { throw new IOException(String.format("Error occurred resolving deserialized method '%s.%s'", declaringClass.getSimpleName(), methodName), e); } }
From source file:sk.stuba.fiit.kvasnicka.qsimsimulation.managers.TopologyManager.java
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); edgeCache = new WeakHashMap<CacheKey, Edge>(); }
From source file:org.plasma.sdo.core.CoreSetting.java
/** * Reads in metadata logical names as string * during de-serialization looks up and// w w w . j a va 2 s . c o m * restores references. * @param in * @throws IOException * @throws ClassNotFoundException */ private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); Type propertyType = PlasmaTypeHelper.INSTANCE.getType(this.propertyTypeUri, this.propertyTypeName); this.property = propertyType.getProperty(this.propertyName); this.propertyName = null; this.propertyTypeName = null; this.propertyTypeUri = null; }
From source file:edu.cuny.jfree.chart.renderer.category.ValueListShapeRenderer.java
private void readObject(final ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); }
From source file:mase.evorbc.KdTreeRepertoire.java
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); long cr = FileUtils.checksumCRC32(repFile); if (repFileHash != cr) { throw new IOException("Repertoire file does not match the expected file"); }/*from w w w. j a v a 2 s . c om*/ if (coordsFile != null) { long cc = FileUtils.checksumCRC32(coordsFile); if (coordsFileHash != cc) { throw new IOException("Coordinates file does not match the expected file"); } } load(repFile, coordsFile); }
From source file:org.hibernate.ejb.metamodel.AbstractAttribute.java
/** * Used by JDK serialization...//ww w .j av a 2 s . c om * * @param ois * The input stream from which we are being read... * @throws java.io.IOException * Indicates a general IO stream exception * @throws ClassNotFoundException * Indicates a class resolution issue */ protected void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { ois.defaultReadObject(); final String memberDeclaringClassName = (String) ois.readObject(); final String memberName = (String) ois.readObject(); final String memberType = (String) ois.readObject(); final Class memberDeclaringClass = Class.forName(memberDeclaringClassName, false, declaringType.getJavaType().getClassLoader()); try { this.member = "method".equals(memberType) ? memberDeclaringClass.getMethod(memberName, ReflectHelper.NO_PARAM_SIGNATURE) : memberDeclaringClass.getField(memberName); } catch (Exception e) { throw new IllegalStateException( "Unable to locate member [" + memberDeclaringClassName + "#" + memberName + "]"); } }