Exemplo n.º 1
0
        /*
         * Reads in a Vector of FilePermissions and saves them in the perms field.
         */
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
        private void ReadObject(ObjectInputStream @in)
        {
            // Don't call defaultReadObject()

            // Read in serialized fields
            ObjectInputStream.GetField gfields = @in.ReadFields();

            // Get the one we want
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") java.util.Vector<Permission> permissions = (java.util.Vector<Permission>)gfields.get("permissions", null);
            List <Permission> permissions = (List <Permission>)gfields.Get("permissions", null);

            Perms = new List <>(permissions.Count);
            Perms.AddRange(permissions);
        }