< prev index next >

## src/java.base/share/classes/java/io/FilePermission.java

Print this page

    @@ -1245,13 +1245,16 @@
          };

          /**
           * @serialData "permissions" field (a Vector containing the FilePermissions).
           */
    -     /*
    +     /**
           * Writes the contents of the perms field out as a Vector for
           * serialization compatibility with earlier releases.
    +      *
    +      * @param  out the {@code ObjectOutputStream} to which data is written
    +      * @throws IOException if an I/O error occurs
           */
          @java.io.Serial
          private void writeObject(ObjectOutputStream out) throws IOException {
              // Don't call out.defaultWriteObject()

    @@ -1261,12 +1264,16 @@
              ObjectOutputStream.PutField pfields = out.putFields();
              pfields.put("permissions", permissions);
              out.writeFields();
          }

    -     /*
    +     /**
           * Reads in a Vector of FilePermissions and saves them in the perms field.
    +      *
    +      * @param  in the {@code ObjectInputStream} from which data is read
    +      * @throws IOException if an I/O error occurs
    +      * @throws ClassNotFoundException if a serialized class cannot be loaded
           */
          @java.io.Serial
          private void readObject(ObjectInputStream in)
              throws IOException, ClassNotFoundException
          {

< prev index next >