/** * Populates a multiset by reading an input stream, as part of deserialization. See {@link * #writeMultiset} for the data format. The number of distinct elements is determined by a prior * call to {@link #readCount}. */ static <E> void populateMultiset( Multiset<E> multiset, ObjectInputStream stream, int distinctElements) throws IOException, ClassNotFoundException { for (int i = 0; i < distinctElements; i++) { @SuppressWarnings("unchecked") // reading data stored by writeMultiset E element = (E) stream.readObject(); int count = stream.readInt(); multiset.add(element, count); } }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { size = in.readInt(); data = (int[]) in.readObject(); linearExpandFactor = in.readInt(); exponentialExpanding = in.readBoolean(); exponentialExpandFactor = in.readDouble(); }
/** * Custom deserialization of Level. * @param s serialization stream. * @throws IOException if IO exception. * @throws ClassNotFoundException if class not found. */ private void readObject(final ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); level = s.readInt(); syslogEquivalent = s.readInt(); levelStr = s.readUTF(); if (levelStr == null) { levelStr = ""; } }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); int levelInt = in.readInt(); level = Level.toLevel(levelInt); int argArrayLen = in.readInt(); if (argArrayLen != NULL_ARGUMENT_ARRAY) { argumentArray = new String[argArrayLen]; for (int i = 0; i < argArrayLen; i++) { Object val = in.readObject(); if (!NULL_ARGUMENT_ARRAY_ELEMENT.equals(val)) { argumentArray[i] = val; } } } }
protected void readBaseObject(ObjectInputStream in) throws IOException, ClassNotFoundException { serverName = (String)in.readObject(); databaseName = (String)in.readObject(); user = (String)in.readObject(); password = (String)in.readObject(); portNumber = in.readInt(); prepareThreshold = in.readInt(); unknownLength = in.readInt(); loginTimeout = in.readInt(); socketTimeout = in.readInt(); ssl = in.readBoolean(); sslfactory = (String)in.readObject(); tcpKeepAlive = in.readBoolean(); compatible = (String)in.readObject(); logLevel = in.readInt(); protocolVersion = in.readInt(); applicationName = (String)in.readObject(); }
private void readObject (ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject (); in.readInt (); // serial version var = (Variable) in.readObject (); alpha = in.readDouble (); beta = in.readDouble (); min = in.readDouble (); max = in.readDouble (); }
ois.readInt(); // method ois.readLong(); // hash System.err.println("Is DGC call for " + Arrays.toString((ObjID[])ois.readObject()));
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); tag = s.readInt(); vr = VR.valueOf(s.readUnsignedShort()); bigEndian = s.readBoolean(); int n = s.readInt(); items = new ArrayList<Object>(n); for (int i = 0; i < n; ++i) { items.add(s.readObject()); } }
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int size = stream.readInt(); setUp(size); while (size-- > 0) { Object key = stream.readObject(); long val = stream.readLong(); put(key, val); } }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { String name = (String) in.readObject(); String value = (String) in.readObject(); clientCookie = new HttpCookie(name, value); clientCookie.setComment((String) in.readObject()); clientCookie.setCommentURL((String) in.readObject()); clientCookie.setDomain((String) in.readObject()); clientCookie.setMaxAge(in.readLong()); clientCookie.setPath((String) in.readObject()); clientCookie.setPortlist((String) in.readObject()); clientCookie.setVersion(in.readInt()); clientCookie.setSecure(in.readBoolean()); clientCookie.setDiscard(in.readBoolean()); } }
/** Reconstitutes the instance from a stream (that is, deserializes it). */ private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException { s.defaultReadObject(); // Read in array length and allocate array int length = s.readInt(); this.longs = new AtomicLongArray(length); // Read in all elements in the proper order. for (int i = 0; i < length; i++) { set(i, s.readDouble()); } } }
private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { // read the non-transient fields in.defaultReadObject(); // read the default value field boolean hasDefaultValue = in.readBoolean(); if (hasDefaultValue) { int size = in.readInt(); byte[] buffer = new byte[size]; in.readFully(buffer); try (ByteArrayInputStream bais = new ByteArrayInputStream(buffer); DataInputViewStreamWrapper inView = new DataInputViewStreamWrapper(bais)) { defaultValue = serializer.deserialize(inView); } catch (Exception e) { throw new IOException("Unable to deserialize default value.", e); } } else { defaultValue = null; } } }
private void readObject(ObjectInputStream input) throws IOException, ClassNotFoundException { featureCount = input.readInt(); userCount = input.readInt(); itemCount = input.readInt(); RealMatrix umat = MatrixUtils.createRealMatrix(userCount, featureCount); for (int i = 0; i < userCount; i++) { for (int j = 0; j < featureCount; j++) { umat.setEntry(i, j, input.readDouble()); } } userMatrix = umat; RealMatrix imat = MatrixUtils.createRealMatrix(itemCount, featureCount); for (int i = 0; i < itemCount; i++) { for (int j = 0; j < featureCount; j++) { imat.setEntry(i, j, input.readDouble()); } } itemMatrix = imat; userIndex = (KeyIndex) input.readObject(); itemIndex = (KeyIndex) input.readObject(); if (userIndex.size() != userMatrix.getRowDimension()) { throw new InvalidObjectException("user matrix and index have different row counts"); } if (itemIndex.size() != itemMatrix.getRowDimension()) { throw new InvalidObjectException("item matrix and index have different row counts"); } }
nextBytes = new byte[DIGEST_LENGTH]; seedLength = ois.readLong(); counter = ois.readLong(); state = ois.readInt(); seed[BYTES_OFFSET] = ois.readInt(); seed[i] = ois.readInt(); seed[HASH_OFFSET + i] = ois.readInt(); seed[FRAME_LENGTH] = ois.readInt(); seed[FRAME_LENGTH + 1] = ois.readInt(); seed[FRAME_LENGTH + 14] = ois.readInt(); seed[FRAME_LENGTH + 15] = ois.readInt(); seed[i] = ois.readInt(); copies[FRAME_LENGTH + EXTRAFRAME_OFFSET + i] = ois.readInt(); copies[i] = ois.readInt(); seed[HASH_OFFSET + i] = ois.readInt(); nextBIndex = ois.readInt(); Streams.readFully(ois, nextBytes, nextBIndex, HASHBYTES_TO_USE - nextBIndex);
private void readObject(final ObjectInputStream o) throws IOException, ClassNotFoundException { final long lowestDiscernibleValue = o.readLong(); final long highestTrackableValue = o.readLong(); final int numberOfSignificantValueDigits = o.readInt(); final int normalizingIndexOffset = o.readInt(); final double integerToDoubleValueConversionRatio = o.readDouble(); final long indicatedTotalCount = o.readLong(); final long indicatedMaxValue = o.readLong(); final long indicatedMinNonZeroValue = o.readLong(); final long indicatedStartTimeStampMsec = o.readLong(); final long indicatedEndTimeStampMsec = o.readLong(); final boolean indicatedAutoResize = o.readBoolean(); final int indicatedwordSizeInBytes = o.readInt(); init(lowestDiscernibleValue, highestTrackableValue, numberOfSignificantValueDigits, integerToDoubleValueConversionRatio, normalizingIndexOffset); // Set internalTrackingValues (can't establish them from array yet, because it's not yet read...) setTotalCount(indicatedTotalCount); maxValue = indicatedMaxValue; minNonZeroValue = indicatedMinNonZeroValue; startTimeStampMsec = indicatedStartTimeStampMsec; endTimeStampMsec = indicatedEndTimeStampMsec; autoResize = indicatedAutoResize; wordSizeInBytes = indicatedwordSizeInBytes; }
private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException { boolean hasValue = in.readBoolean(); String vstring = in.readUTF(); projectName = hasValue ? vstring : null; hasValue = in.readBoolean(); int vint = in.readInt(); tabSize = hasValue ? vint : null; hasValue = in.readBoolean(); long vlong = in.readLong(); analyzerGuruVersion = hasValue ? vlong : null; /** * De-serialization circumvents normal construction, so the following * field could be null. */ if (analyzersVersions == null) { analyzersVersions = new HashMap<>(); } int analyzerCount = in.readInt(); for (int i = 0; i < analyzerCount; ++i) { vstring = in.readUTF(); vlong = in.readLong(); analyzersVersions.put(vstring, vlong); } }
final int n = ois.readInt(); final int m = ois.readInt(); final double[][] data = new double[n][m]; for (int i = 0; i < n; ++i) { final double[] dataI = data[i]; for (int j = 0; j < m; ++j) { dataI[j] = ois.readDouble();
@SuppressWarnings("unchecked") private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); init(DEFAULT_SIZE, DEFAULT_LOAD_FACTOR); int elementCount = stream.readInt(); for (int i = elementCount; --i >= 0; ) { K key = (K) stream.readObject(); V value = (V) stream.readObject(); put(key, value); } } }
if (in.readBoolean()) { switch (in.readInt()) { return ((Class<?>) in.readObject());
/** * Populates a multimap by reading an input stream, as part of deserialization. See {@link * #writeMultimap} for the data format. The number of distinct keys is determined by a prior call * to {@link #readCount}. */ static <K, V> void populateMultimap( Multimap<K, V> multimap, ObjectInputStream stream, int distinctKeys) throws IOException, ClassNotFoundException { for (int i = 0; i < distinctKeys; i++) { @SuppressWarnings("unchecked") // reading data stored by writeMultimap K key = (K) stream.readObject(); Collection<V> values = multimap.get(key); int valueCount = stream.readInt(); for (int j = 0; j < valueCount; j++) { @SuppressWarnings("unchecked") // reading data stored by writeMultimap V value = (V) stream.readObject(); values.add(value); } } }