< prev index next >

src/jdk.zipfs/share/classes/module-info.java

Print this page

        

@@ -145,64 +145,125 @@
  * </thead>
  *
  * <tbody>
  * <tr>
  *   <th scope="row">create</th>
- *   <td>java.lang.String</td>
+ *   <td>{@link java.lang.String} or {@link java.lang.Boolean}</td>
  *   <td>false</td>
  *   <td>
  *       If the value is {@code true}, the Zip file system provider
  *       creates a new Zip or JAR file if it does not exist.
  *   </td>
  * </tr>
  * <tr>
  *   <th scope="row">encoding</th>
- *   <td>java.lang.String</td>
+ *   <td>{@link java.lang.String}</td>
  *   <td>UTF-8</td>
  *   <td>
  *       The value indicates the encoding scheme for the
  *       names of the entries in the Zip or JAR file.
  *   </td>
  * </tr>
  * <tr>
- *   <td scope="row">enablePosixFileAttributes</td>
- *   <td>java.lang.String</td>
+ *   <th scope="row">enablePosixFileAttributes</th>
+ *   <td>{@link java.lang.String} or {@link java.lang.Boolean}</td>
  *   <td>false</td>
  *   <td>
  *       If the value is {@code true}, the Zip file system will support
  *       the {@link java.nio.file.attribute.PosixFileAttributeView PosixFileAttributeView}.
  *   </td>
  * </tr>
  * <tr>
- *   <td scope="row">defaultOwner</td>
- *   <td>{@link java.nio.file.attribute.UserPrincipal UserPrincipal}<br> or java.lang.String</td>
+ *   <th scope="row">defaultOwner</th>
+ *   <td>{@link java.nio.file.attribute.UserPrincipal UserPrincipal}<br> or
+ *   {@link java.lang.String}</td>
  *   <td>null/unset</td>
  *   <td>
  *       Override the default owner for entries in the Zip file system.<br>
  *       The value can be a UserPrincipal or a String value that is used as the UserPrincipal's name.
  *   </td>
  * </tr>
  * <tr>
- *   <td scope="row">defaultGroup</td>
- *   <td>{@link java.nio.file.attribute.GroupPrincipal GroupPrincipal}<br> or java.lang.String</td>
+ *   <th scope="row">defaultGroup</th>
+ *   <td>{@link java.nio.file.attribute.GroupPrincipal GroupPrincipal}<br> or
+ *   {@link java.lang.String}</td>
  *   <td>null/unset</td>
  *   <td>
  *       Override the the default group for entries in the Zip file system.<br>
  *       The value can be a GroupPrincipal or a String value that is used as the GroupPrincipal's name.
  *   </td>
  * </tr>
  * <tr>
- *   <td scope="row">defaultPermissions</td>
+ *   <th scope="row">defaultPermissions</th>
  *   <td>{@link java.util.Set Set}&lt;{@link java.nio.file.attribute.PosixFilePermission PosixFilePermission}&gt;<br>
- *       or java.lang.String</td>
+ *       or {@link java.lang.String}</td>
  *   <td>null/unset</td>
  *   <td>
  *       Override the default Set of permissions for entries in the Zip file system.<br>
  *       The value can be a {@link java.util.Set Set}&lt;{@link java.nio.file.attribute.PosixFilePermission PosixFilePermission}&gt; or<br>
  *       a String that is parsed by {@link java.nio.file.attribute.PosixFilePermissions#fromString PosixFilePermissions::fromString}
  *   </td>
  * </tr>
+ * <tr>
+ *   <th scope="row">compressionMethod</th>
+ *   <td>{@link java.lang.String}</td>
+ *   <td>"DEFLATED"</td>
+ *   <td>
+ *       The value representing the compression method to use when writing entries
+ *       to the Zip file system.
+ *       <ul>
+ *           <li>
+ *               If the value is {@code "STORED"}, the Zip file system provider will
+ *               not compress entries when writing to the Zip file system.
+ *           </li>
+ *           <li>
+ *               If the value is {@code "DEFLATED"} or the property is not set,
+ *               the Zip file system provider will use data compression when
+ *               writing entries to the Zip file system.
+ *           </li>
+ *           <li>
+ *               If the value is not {@code "STORED"} or {@code "DEFLATED"}, an
+ *               {@code IllegalArgumentException} will be thrown when the Zip
+ *               filesystem is created.
+ *           </li>
+ *       </ul>
+ *   </td>
+ * </tr>
+ * <tr>
+ *   <th scope="row">releaseVersion</th>
+ *   <td>{@link java.lang.String} or {@link java.lang.Integer}</td>
+ *   <td>null/unset</td>
+ *   <td>
+ *       A value representing the version entry to use when accessing a
+ *       <a href=="{@docRoot}/../specs/jar/jar.html#multi-release-jar-files">
+ *       multi-release JAR</a>. If the JAR is not a
+ *       <a href=="{@docRoot}/../specs/jar/jar.html#multi-release-jar-files">
+ *       multi-release JAR</a>, the value will be ignored and the JAR will
+ *       considered un-versioned.
+ *       <p>
+ *       The value must represent a valid
+ *       {@linkplain Runtime.Version Java SE Platform version number},
+ *       such as {@code 9}, or {@code 14} in order to determine the version entry.
+ *
+ *       <ul>
+ *           <li>
+ *               If the value is {@code null} or the property is not set,
+ *               then the JAR will be treated as an un-versioned JAR.
+ *           </li>
+ *           <li>
+ *               If the value is {@code "runtime"}, the
+ *               version entry will be determined by invoking
+ *               {@linkplain Runtime.Version#feature() Runtime.Version.feature()}.
+ *           </li>
+ *           <li>
+ *               If the value does not represent a valid
+ *               {@linkplain Runtime.Version Java SE Platform version number},
+ *               an {@code IllegalArgumentException} will be thrown.
+ *           </li>
+ *       </ul>
+ *   </td>
+ * </tr>
  * </tbody>
  * </table>
  *
  * <h2>Examples:</h2>
  *

@@ -221,11 +282,11 @@
  * and using automatic file type detection. Iterate from the root of the JAR displaying each
  * found entry:
  * <pre>
  * {@code
  *
- *     FileSystem zipfs = FileSystems.newFileSystem(Path.of("helloworld.jar"), null);
+ *     FileSystem zipfs = FileSystems.newFileSystem(Path.of("helloworld.jar"));
  *     Path rootDir = zipfs.getPath("/");
  *     Files.walk(rootDir)
  *            .forEach(System.out::println);
  * }
  * </pre>
< prev index next >