< prev index next >

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

Print this page

        

@@ -145,64 +145,110 @@
  * </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">noCompression</th>
+ *   <td>{@link java.lang.String} or {@link java.lang.Boolean}n</td>
+ *   <td>false</td>
+ *   <td>
+ *       If the value is {@code true}, the Zip file system provider will
+ *       not compress entries when writing to the Zip file system.
+ *       If the value is {@code false}, the Zip file system provider will
+ *       use data compression when writing entries to the Zip file system.
+ *   </td>
+ * </tr>
+ * <tr>
+ *   <th scope="row">releaseVersion</th>
+ *   <td>{@link java.lang.String} or {@link java.lang.Integer} or
+ *   {@link java.lang.Runtime.Version}</td>
+ *   <td>null/unset</td>
+ *   <td>
+ *       A value representing the version entry to use when accessing a
+ *       multi-release JAR. If the JAR is not a multi-release JAR, the value
+ *       will be ignored and the JAR will considered un-versioned.
+ *       <p>
+ *
+ *       <ul>
+ *           <li>
+ *               If the value is {@code "runtime"} or is a
+ *               {@linkplain java.lang.Runtime.Version Version} Object, the
+ *               version entry will be determined by invoking
+ *               {@linkplain Runtime.Version#feature() Version.feature()}.
+ *           </li>
+ *           <li>
+ *               If the Object is a {@linkplain java.lang.String} or an
+ *               {@linkplain java.lang.Integer}, its value must represent a valid
+ *               {@linkplain Runtime.Version Java SE Platform version number},
+ *               such as {@code 9}, {@code 11.0.1}, or {@code 14} in order to
+ *               determine the version entry.
+ *           </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 +267,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 >