code: public static void write(DataOutput out, FsPermission masked) throws IOException {
      FsPermission perm = new FsPermission(masked);
      perm.write(out);
    }
docs: Write {@link FsPermission} to {@link DataInput}