List of usage examples for java.io ObjectInputStream defaultReadObject
public void defaultReadObject() throws IOException, ClassNotFoundException
From source file:org.apache.flink.streaming.runtime.operators.windowing.NonKeyedWindowOperator.java
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); currentWatermark = -1;/* w ww .ja v a 2s. c om*/ }
From source file:WeakSet.java
@SuppressWarnings("unchecked") private void readObject(ObjectInputStream obtis) throws IOException, ClassNotFoundException { obtis.defaultReadObject(); Object[] arr = (Object[]) obtis.readObject(); entries = new Entry[(int) (size * 1.5)]; refq = new ReferenceQueue<E>(); for (int i = 0; i < arr.length; i++) { add((E) arr[i]);//w w w . j a v a 2 s .c o m } }
From source file:org.picocontainer.gems.containers.CommonsLoggingTracingContainerDecorator.java
private void readObject(final java.io.ObjectInputStream s) throws java.io.IOException, java.lang.ClassNotFoundException { s.defaultReadObject(); log = LogFactory.getLog(this.logCategory); }
From source file:edu.cmu.tetrad.regression.LogisticRegression.java
/** * Adds semantic checks to the default deserialization method. This method * must have the standard signature for a readObject method, and the body of * the method must begin with "s.defaultReadObject();". Other than that, any * semantic checks can be specified and do not need to stay the same from * version to version. A readObject method of this form may be added to any * class, even if Tetrad sessions were previously saved out using a version * of the class that didn't include it. (That's what the * "s.defaultReadObject();" is for. See J. Bloch, Effective Java, for help. * * @throws java.io.IOException//from w ww . j a va2s . c o m * @throws ClassNotFoundException */ private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); }
From source file:IntObjectHashMap.java
/** * Reconstitute the <tt>IntObjectHashMap</tt> instance from a stream (i.e., * deserialize it).//from w w w . ja va 2 s . c o m */ private void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException { // Read in the threshold, loadfactor, and any hidden stuff s.defaultReadObject(); // Read in number of buckets and allocate the bucket array; int numBuckets = s.readInt(); table = new Entry[numBuckets]; // Read in size (number of Mappings) int size = s.readInt(); // Read the keys and values, and put the mappings in the IntObjectHashMap for (int i = 0; i < size; i++) { int key = s.readInt(); Object value = s.readObject(); putForCreate(key, value); } }
From source file:com.limegroup.gnutella.xml.LimeXMLDocument.java
/** * Reads the object and initializes transient fields. *//* w w w . j av a 2 s .com*/ private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); scanFields(); }
From source file:org.apache.axis.description.OperationDesc.java
private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); Class clazz = (Class) in.readObject(); if (clazz != null) { String methodName = (String) in.readObject(); Class[] parameterTypes = (Class[]) in.readObject(); try {/*from w ww.j av a 2 s . co m*/ method = clazz.getMethod(methodName, parameterTypes); } catch (NoSuchMethodException e) { throw new IOException("Unable to deserialize the operation's method: " + methodName); } } }
From source file:org.apache.flink.api.java.typeutils.runtime.kryo.KryoSerializer.java
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); // kryoRegistrations may be null if this Kryo serializer is deserialized from an old version if (kryoRegistrations == null) { this.kryoRegistrations = buildKryoRegistrations(type, registeredTypes, registeredTypesWithSerializerClasses, registeredTypesWithSerializers); }/*w w w .j av a 2 s. c om*/ }
From source file:it.scoppelletti.programmerpower.web.control.ActionBase.java
/** * Deserializza l’oggetto.//from w ww .j a v a 2 s.c o m * * @param in Flusso di lettura. */ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { int i, n; in.defaultReadObject(); myMessages = new ArrayList<ActionMessage>(); n = in.readInt(); for (i = 0; i < n; n++) { myMessages.add((ActionMessage) in.readObject()); } }
From source file:com.projity.pm.assignment.HasAssignmentsImpl.java
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); assignments = new AssociationList(); }