private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { size = in.readInt(); data = (int[]) in.readObject(); linearExpandFactor = in.readInt(); exponentialExpanding = in.readBoolean(); exponentialExpandFactor = in.readDouble(); }
/** * Serialization read support - reads in the Map principals collection if it exists in the * input stream. * <p/> * NOTE: Don't forget to change the serialVersionUID constant at the top of this class * if you make any backwards-incompatible serialization changes!!! * (use the JDK 'serialver' program for this) * * @param in input stream provided by * @throws IOException if there is an input/output problem * @throws ClassNotFoundException if the underlying Map implementation class is not available to the classloader. */ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); boolean principalsExist = in.readBoolean(); if (principalsExist) { this.realmPrincipals = (Map<String, Set>) in.readObject(); } } }
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); } }
/** * Override readObject which is used in serialization. Customize serialization of this exception * to avoid escape of InternalRole which is not Serializable. */ private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { String inName = (String) in.readObject(); String inDescription = (String) in.readObject(); Object inValue = in.readObject(); Class inClass = (Class) in.readObject(); boolean inUserModifiable = in.readBoolean(); this.deserialized = true; this.name = inName; setInternalState(inDescription, inValue, inClass, inUserModifiable); }
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(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 ois) throws IOException, ClassNotFoundException { Channel channel = Channel.current(); assert channel!=null; ois.defaultReadObject(); if(ois.readBoolean()) { this.channel = channel; this.filter = null; } else { this.channel = null; // If the remote channel wants us to create a FilePath that points to a local file, // we need to make sure the access control takes place. // This covers the immediate case of FileCallables taking FilePath into reference closure implicitly, // but it also covers more general case of FilePath sent as a return value or argument. this.filter = SoloFilePathFilter.wrap(FilePathFilter.current()); } }
if (in.readBoolean()) { switch (in.readInt()) { return ((Class<?>) in.readObject());
/** * Overrides the default readObject implementation since we decided * it would be cleaner not to serialize the entire tranformer * factory. [ ref bugzilla 12317 ] * We need to check if the user defined class for URIResolver also * implemented Serializable * if yes then we need to deserialize the URIResolver * Fix for bugzilla bug 22438 */ private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException { is.defaultReadObject(); if (is.readBoolean()) { _uriResolver = (URIResolver) is.readObject(); } _tfactory = new TransformerFactoryImpl(); }
@Override public void open() throws IOException { File file = new File(directory, JOURNAL_FILENAME); if (file.isFile()) { try (ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file))) { boolean valid = ois.readBoolean(); states.clear(); if (valid) { Map<TransactionId, SerializableEntry<K>> readStates = uncheckedCast(ois.readObject()); for (Map.Entry<TransactionId, SerializableEntry<K>> entry : readStates.entrySet()) { SerializableEntry<K> value = entry.getValue(); states.put(entry.getKey(), new Entry<>(value.state, value.heuristic, value.deserializeKeys(keySerializer))); } } } catch (IOException ioe) { LOGGER.warn("Cannot read XA journal, truncating it", ioe); } catch (ClassNotFoundException cnfe) { LOGGER.warn("Cannot deserialize XA journal contents, truncating it", cnfe); } finally { try (ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(file))) { oos.writeObject(false); } } } }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); String uuid = in.readUTF(); String host = in.readUTF(); int port = in.readInt(); boolean liteMember = in.readBoolean(); MemberVersion version = (MemberVersion) in.readObject(); member = new MemberImpl(new Address(host, port), version, false, uuid, null, liteMember); } }
private void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); // Read nothing final int len = s.readInt(); // Read max element _nbsi = new NBSI(len, new ConcurrentAutoTable(), this); for( int i=0; i<len; i++ ) // Read all bits if( s.readBoolean() ) _nbsi.add(i); }
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException { s.defaultReadObject(); a = new boolean[size]; for (int i = 0; i < size; i++) a[i] = s.readBoolean(); } }
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; }
if (in.readBoolean()) { switch (in.readInt()) { return ((Class<?>) in.readObject());
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); String name = (String) in.readObject(); String value = (String) in.readObject(); long expiresAt = in.readLong(); String domain = (String) in.readObject(); String path = (String) in.readObject(); boolean secure = in.readBoolean(); boolean httpOnly = in.readBoolean(); boolean hostOnly = in.readBoolean(); boolean persistent = in.readBoolean(); Cookie.Builder builder = new Cookie.Builder(); builder = builder.name(name); builder = builder.value(value); builder = builder.expiresAt(expiresAt); builder = hostOnly ? builder.hostOnlyDomain(domain) : builder.domain(domain); builder = builder.path(path); builder = secure ? builder.secure() : builder; builder = httpOnly ? builder.httpOnly() : builder; clientCookie = builder.build(); }
return new ImmutableEntityEntry( persistenceContext.getSession().getFactory(), (String) ois.readObject(), (Serializable) ois.readObject(), Status.valueOf( (String) ois.readObject() ), ( previousStatusString = (String) ois.readObject() ).length() == 0 ? null ois.readObject(), LockMode.valueOf( (String) ois.readObject() ), ois.readBoolean(), ois.readBoolean(), null );
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); String uuid = in.readUTF(); String host = in.readUTF(); int port = in.readInt(); boolean liteMember = in.readBoolean(); MemberVersion version = (MemberVersion) in.readObject(); member = new MemberImpl(new Address(host, port), version, false, uuid, null, liteMember); } }
private void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); // Read nothing final int len = s.readInt(); // Read max element _nbsi = new NBSI(len, new ConcurrentAutoTable(), this); for( int i=0; i<len; i++ ) // Read all bits if( s.readBoolean() ) _nbsi.add(i); }
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException { s.defaultReadObject(); a = new boolean[size]; for (int i = 0; i < size; i++) a[i] = s.readBoolean(); } }