Code example for ObjectInputStream

Methods: defaultReadObjectreadObject

        // reading data stored by writeObject 
        private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
            factory = (Supplier<? extends Set<V>>) stream.readObject();
            Map<K, Collection<V>> map = (Map<K, Collection<V>>) stream.readObject();
        private static final long serialVersionUID = 0;
     * Creates a new {@code SetMultimap} that uses the provided map and factory. 
     * It can generate a multimap based on arbitrary {@link Map} and {@link Set} 
     * classes. 
     * <p/> 
     * <p/> 
Experience pair programming with AI  Get Codota for Java