/** * Populates a map by reading an input stream, as part of deserialization. See {@link #writeMap} * for the data format. */ static <K, V> void populateMap(Map<K, V> map, ObjectInputStream stream) throws IOException, ClassNotFoundException { int size = stream.readInt(); populateMap(map, stream, size); }
/** * Populates a map by reading an input stream, as part of deserialization. See {@link #writeMap} * for the data format. */ static <K, V> void populateMap(Map<K, V> map, ObjectInputStream stream) throws IOException, ClassNotFoundException { int size = stream.readInt(); populateMap(map, stream, size); }
/** * Populates a map by reading an input stream, as part of deserialization. See {@link #writeMap} * for the data format. */ static <K, V> void populateMap(Map<K, V> map, ObjectInputStream stream) throws IOException, ClassNotFoundException { int size = stream.readInt(); populateMap(map, stream, size); }
@SuppressWarnings("unchecked") // reading field populated by writeObject @GwtIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); keyType = (Class<K>) stream.readObject(); setDelegates( WellBehavedMap.wrap(new EnumMap<K, V>(keyType)), new HashMap<V, K>(keyType.getEnumConstants().length * 3 / 2)); Serialization.populateMap(this, stream); }
@SuppressWarnings("unchecked") // reading fields populated by writeObject @GwtIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); keyType = (Class<K>) stream.readObject(); valueType = (Class<V>) stream.readObject(); setDelegates( WellBehavedMap.wrap(new EnumMap<K, V>(keyType)), WellBehavedMap.wrap(new EnumMap<V, K>(valueType))); Serialization.populateMap(this, stream); }
@GwtIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int size = Serialization.readCount(stream); init(16); // resist hostile attempts to allocate gratuitous heap Serialization.populateMap(this, stream, size); }
@SuppressWarnings("unchecked") // reading field populated by writeObject @GwtIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); keyType = (Class<K>) stream.readObject(); setDelegates( WellBehavedMap.wrap(new EnumMap<K, V>(keyType)), new HashMap<V, K>(keyType.getEnumConstants().length * 3 / 2)); Serialization.populateMap(this, stream); }
@GwtIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int size = Serialization.readCount(stream); init(16); // resist hostile attempts to allocate gratuitous heap Serialization.populateMap(this, stream, size); } }
@SuppressWarnings("unchecked") // reading fields populated by writeObject @GwtIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); keyType = (Class<K>) stream.readObject(); valueType = (Class<V>) stream.readObject(); setDelegates( WellBehavedMap.wrap(new EnumMap<K, V>(keyType)), WellBehavedMap.wrap(new EnumMap<V, K>(valueType))); Serialization.populateMap(this, stream); }
@SuppressWarnings("unchecked") // reading field populated by writeObject @GwtIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); keyType = (Class<K>) stream.readObject(); setDelegates( WellBehavedMap.wrap(new EnumMap<K, V>(keyType)), new HashMap<V, K>(keyType.getEnumConstants().length * 3 / 2)); Serialization.populateMap(this, stream); }
@SuppressWarnings("unchecked") // reading fields populated by writeObject @GwtIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); keyType = (Class<K>) stream.readObject(); valueType = (Class<V>) stream.readObject(); setDelegates( WellBehavedMap.wrap(new EnumMap<K, V>(keyType)), WellBehavedMap.wrap(new EnumMap<V, K>(valueType))); Serialization.populateMap(this, stream); }
@GwtIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int size = Serialization.readCount(stream); init(16); // resist hostile attempts to allocate gratuitous heap Serialization.populateMap(this, stream, size); }
/** * Populates a map by reading an input stream, as part of deserialization. * See {@link #writeMap} for the data format. */ @GwtIncompatible("java.io.ObjectInputStream") public static <K, V> void populateMap(Map<K, V> map, ObjectInputStream stream) throws IOException, ClassNotFoundException { int size = stream.readInt(); populateMap(map, stream, size); }
@SuppressWarnings("unchecked") // reading fields populated by writeObject private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); keyType = (Class<K>) stream.readObject(); valueType = (Class<V>) stream.readObject(); setDelegates(new EnumMap<K, V>(keyType), new EnumMap<V, K>(valueType)); Serialization.populateMap(this, stream); }
@SuppressWarnings("unchecked") // reading fields populated by writeObject private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); keyType = (Class<K>) stream.readObject(); valueType = (Class<V>) stream.readObject(); setDelegates(new EnumMap<K, V>(keyType), new EnumMap<V, K>(valueType)); Serialization.populateMap(this, stream); }
@SuppressWarnings("unchecked") // reading field populated by writeObject private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); keyType = (Class<K>) stream.readObject(); setDelegates(new EnumMap<K, V>(keyType), new HashMap<V, K>(keyType.getEnumConstants().length * 3 / 2)); Serialization.populateMap(this, stream); }
/** * Populates a map by reading an input stream, as part of deserialization. * See {@link #writeMap} for the data format. */ @GwtIncompatible("java.io.ObjectInputStream") static <K, V> void populateMap(Map<K, V> map, ObjectInputStream stream) throws IOException, ClassNotFoundException { int size = stream.readInt(); populateMap(map, stream, size); }
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int size = Serialization.readCount(stream); setDelegates(Maps.<K, V>newHashMapWithExpectedSize(size), Maps.<V, K>newHashMapWithExpectedSize(size)); Serialization.populateMap(this, stream, size); }
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int size = Serialization.readCount(stream); setDelegates(Maps.<K, V>newHashMapWithExpectedSize(size), Maps.<V, K>newHashMapWithExpectedSize(size)); Serialization.populateMap(this, stream, size); }
@SuppressWarnings("unchecked") // reading field populated by writeObject @GwtIncompatible("java.io.ObjectInputStream") private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); keyType = (Class<K>) stream.readObject(); setDelegates(WellBehavedMap.wrap(new EnumMap<K, V>(keyType)), new HashMap<V, K>(keyType.getEnumConstants().length * 3 / 2)); Serialization.populateMap(this, stream); }