Beispiel #1
0
        /// <summary>
        /// writeObject is called to save the state of the {@code BatchUpdateException}
        /// to a stream.
        /// </summary>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException, ClassNotFoundException
        private void WriteObject(ObjectOutputStream s)
        {
            ObjectOutputStream.PutField fields = s.PutFields();
            fields.Put("updateCounts", UpdateCounts_Renamed);
            fields.Put("longUpdateCounts", LongUpdateCounts);
            s.WriteFields();
        }
Beispiel #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
        private void WriteObject(ObjectOutputStream @out)
        {
            // Don't call defaultWriteObject()
            ObjectOutputStream.PutField pfields = @out.PutFields();
            pfields.Put("hostname", Holder.Hostname);
            pfields.Put("addr", Holder.Addr);
            pfields.Put("port", Holder.Port_Renamed);
            @out.WriteFields();
        }
        /// <summary>
        /// @serialData Default field.
        /// </summary>

        /*
         * Writes the contents of the perms field out as a Hashtable
         * in which the values are Vectors for
         * serialization compatibility with earlier releases.
         */
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
        private void WriteObject(ObjectOutputStream @out)
        {
            // Don't call out.defaultWriteObject()

            // Copy perms into a Hashtable
            Dictionary <String, Vector <UnresolvedPermission> > permissions = new Dictionary <String, Vector <UnresolvedPermission> >(Perms.Size() * 2);

            // Convert each entry (List) into a Vector
            lock (this)
            {
                Set <Map_Entry <String, List <UnresolvedPermission> > > set = Perms.EntrySet();
                foreach (Map_Entry <String, List <UnresolvedPermission> > e in set)
                {
                    // Convert list into Vector
                    List <UnresolvedPermission>   list = e.Value;
                    Vector <UnresolvedPermission> vec  = new Vector <UnresolvedPermission>(list.Count);
                    lock (list)
                    {
                        vec.AddAll(list);
                    }

                    // Add to Hashtable being serialized
                    permissions.Put(e.Key, vec);
                }
            }

            // Write out serializable fields
            ObjectOutputStream.PutField pfields = @out.PutFields();
            pfields.Put("permissions", permissions);
            @out.WriteFields();
        }
Beispiel #4
0
        /// <summary>
        /// @serialData Default fields.
        /// </summary>

        /*
         * Writes the contents of the perms field out as a Hashtable for
         * serialization compatibility with earlier releases. all_allowed
         * unchanged.
         */
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
        private void WriteObject(ObjectOutputStream @out)
        {
            // Don't call out.defaultWriteObject()

            // Copy perms into a Hashtable
            Dictionary <String, Permission> permissions = new Dictionary <String, Permission>(Perms.Count * 2);

            lock (this)
            {
                permissions.PutAll(Perms);
            }

            // Write out serializable fields
            ObjectOutputStream.PutField pfields = @out.PutFields();
            pfields.Put("all_allowed", All_allowed);
            pfields.Put("permissions", permissions);
            @out.WriteFields();
        }
        /// <summary>
        /// @serialData Null terminated list of <code>PropertyChangeListeners</code>.
        /// <para>
        /// At serialization time we skip non-serializable listeners and
        /// only serialize the serializable listeners.
        /// </para>
        /// </summary>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException
        private void WriteObject(ObjectOutputStream s)
        {
            Dictionary <String, PropertyChangeSupport> children = null;

            PropertyChangeListener[] listeners = null;
            lock (this.Map)
            {
                foreach (Map_Entry <String, PropertyChangeListener[]> entry in this.Map.Entries)
                {
                    String property = entry.Key;
                    if (property == null)
                    {
                        listeners = entry.Value;
                    }
                    else
                    {
                        if (children == null)
                        {
                            children = new Dictionary <>();
                        }
                        PropertyChangeSupport pcs = new PropertyChangeSupport(this.Source);
                        pcs.Map.Set(null, entry.Value);
                        children[property] = pcs;
                    }
                }
            }
            ObjectOutputStream.PutField fields = s.PutFields();
            fields.Put("children", children);
            fields.Put("source", this.Source);
            fields.Put("propertyChangeSupportSerializedDataVersion", 2);
            s.WriteFields();

            if (listeners != null)
            {
                foreach (PropertyChangeListener l in listeners)
                {
                    if (l is Serializable)
                    {
                        s.WriteObject(l);
                    }
                }
            }
            s.WriteObject(null);
        }
Beispiel #6
0
        /// <summary>
        /// Writes serializable fields to stream.
        /// </summary>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException
        private void WriteObject(ObjectOutputStream s)
        {
            Dictionary <String, Component> tab = new Dictionary <String, Component>();
            int ncomponents = Vector.Count;

            for (int i = 0; i < ncomponents; i++)
            {
                Card card = (Card)Vector[i];
                tab[card.Name] = card.Comp;
            }

            ObjectOutputStream.PutField f = s.PutFields();
            f.Put("hgap", Hgap_Renamed);
            f.Put("vgap", Vgap_Renamed);
            f.Put("vector", Vector);
            f.Put("currentCard", CurrentCard);
            f.Put("tab", tab);
            s.WriteFields();
        }
Beispiel #7
0
        /// <summary>
        /// @serialData Default fields.
        /// </summary>

        /*
         * Writes the contents of the perms field out as a Hashtable for
         * serialization compatibility with earlier releases. all_allowed
         * and permClass unchanged.
         */
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
        private void WriteObject(ObjectOutputStream @out)
        {
            // Don't call out.defaultWriteObject()

            // Copy perms into a Hashtable
            Dictionary <String, Permission> permissions = new Dictionary <String, Permission>(Perms.Count * 2);

            lock (this)
            {
//JAVA TO C# CONVERTER TODO TASK: There is no .NET Dictionary equivalent to the Java 'putAll' method:
                permissions.putAll(Perms);
            }

            // Write out serializable fields
            ObjectOutputStream.PutField pfields = @out.PutFields();
            pfields.Put("all_allowed", All_allowed);
            pfields.Put("permissions", permissions);
            pfields.Put("permClass", PermClass);
            @out.WriteFields();
        }
Beispiel #8
0
        /// <summary>
        /// @serialData Default fields.
        /// </summary>

        /*
         * Writes the contents of the permsMap field out as a Hashtable for
         * serialization compatibility with earlier releases. allPermission
         * unchanged.
         */
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
        private void WriteObject(ObjectOutputStream @out)
        {
            // Don't call out.defaultWriteObject()

            // Copy perms into a Hashtable
            Dictionary <Class, PermissionCollection> perms = new Dictionary <Class, PermissionCollection>(PermsMap.Count * 2);           // no sync; estimate

            lock (this)
            {
//JAVA TO C# CONVERTER TODO TASK: There is no .NET Dictionary equivalent to the Java 'putAll' method:
                perms.putAll(PermsMap);
            }

            // Write out serializable fields
            ObjectOutputStream.PutField pfields = @out.PutFields();

            pfields.Put("allPermission", AllPermission);             // no sync; staleness OK
            pfields.Put("perms", perms);
            @out.WriteFields();
        }
Beispiel #9
0
        /// <summary>
        /// default behavior is overridden in order to write the
        /// scope_ifname field as a String, rather than a NetworkInterface
        /// which is not serializable
        /// </summary>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private synchronized void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException
        private void WriteObject(ObjectOutputStream s)
        {
            lock (this)
            {
                String ifname = null;

                if (Holder6.Scope_ifname != null)
                {
                    ifname = Holder6.Scope_ifname.Name;
                    Holder6.Scope_ifname_set = true;
                }
                ObjectOutputStream.PutField pfields = s.PutFields();
                pfields.Put("ipaddress", Holder6.Ipaddress);
                pfields.Put("scope_id", Holder6.Scope_id);
                pfields.Put("scope_id_set", Holder6.Scope_id_set);
                pfields.Put("scope_ifname_set", Holder6.Scope_ifname_set);
                pfields.Put("ifname", ifname);
                s.WriteFields();
            }
        }