mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8326687: Inconsistent use of "ZIP", "Zip" and "zip" in java.util.zip/jar zipfs javadoc
Reviewed-by: dfuchs, jpai, gli
This commit is contained in:
parent
b938a5c9ed
commit
38ad514589
12 changed files with 123 additions and 123 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -33,28 +33,28 @@ import java.nio.file.attribute.PosixFileAttributeView;
|
|||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Provides the implementation of the Zip file system provider.
|
||||
* The Zip file system provider treats the contents of a Zip or JAR file as a file system.
|
||||
* Provides the implementation of the ZIP file system provider.
|
||||
* The ZIP file system provider treats the contents of a ZIP or JAR file as a file system.
|
||||
*
|
||||
* <h2>Accessing a Zip File System</h2>
|
||||
* <h2>Accessing a ZIP File System</h2>
|
||||
*
|
||||
* The {@linkplain java.nio.file.FileSystems FileSystems} {@code newFileSystem}
|
||||
* static factory methods can be used to:
|
||||
* <ul>
|
||||
* <li>Create a Zip file system</li>
|
||||
* <li>Open an existing file as a Zip file system</li>
|
||||
* <li>Create a ZIP file system</li>
|
||||
* <li>Open an existing file as a ZIP file system</li>
|
||||
* </ul>
|
||||
*
|
||||
* The Zip file system provider does not support opening an existing Zip file
|
||||
* The ZIP file system provider does not support opening an existing ZIP file
|
||||
* that contains entries with "." or ".." in its name elements.
|
||||
*
|
||||
* <h2>URI Scheme Used to Identify the Zip File System</h2>
|
||||
* <h2>URI Scheme Used to Identify the ZIP File System</h2>
|
||||
*
|
||||
* The URI {@link java.net.URI#getScheme scheme} that identifies the ZIP file system is {@code jar}.
|
||||
*
|
||||
* <h2>POSIX file attributes</h2>
|
||||
*
|
||||
* A Zip file system supports a file attribute {@link FileAttributeView view}
|
||||
* A ZIP file system supports a file attribute {@link FileAttributeView view}
|
||||
* named "{@code zip}" that defines the following file attribute:
|
||||
*
|
||||
* <blockquote>
|
||||
|
@ -76,8 +76,8 @@ import java.util.Set;
|
|||
* </blockquote>
|
||||
*
|
||||
* The "permissions" attribute is the set of access permissions that are optionally
|
||||
* stored for entries in a Zip file. The value of the attribute is {@code null}
|
||||
* for entries that do not have access permissions. Zip file systems do not
|
||||
* stored for entries in a ZIP file. The value of the attribute is {@code null}
|
||||
* for entries that do not have access permissions. ZIP file systems do not
|
||||
* enforce access permissions.
|
||||
*
|
||||
* <p> The "permissions" attribute may be read and set using the
|
||||
|
@ -92,12 +92,12 @@ import java.util.Set;
|
|||
* }
|
||||
* } </pre>
|
||||
*
|
||||
* <p> In addition to the "{@code zip}" view, a Zip file system optionally supports
|
||||
* <p> In addition to the "{@code zip}" view, a ZIP file system optionally supports
|
||||
* the {@link PosixFileAttributeView} ("{@code posix}").
|
||||
* This view extends the "{@code basic}" view with type safe access to the
|
||||
* {@link PosixFileAttributes#owner() owner}, {@link PosixFileAttributes#group() group-owner},
|
||||
* and {@link PosixFileAttributes#permissions() permissions} attributes. The
|
||||
* "{@code posix}" view is only supported when the Zip file system is created with
|
||||
* "{@code posix}" view is only supported when the ZIP file system is created with
|
||||
* the provider property "{@code enablePosixFileAttributes}" set to "{@code true}".
|
||||
* The following creates a file system with this property and reads the access
|
||||
* permissions of a file:
|
||||
|
@ -110,16 +110,16 @@ import java.util.Set;
|
|||
* } </pre>
|
||||
*
|
||||
* <p> The file owner and group owner attributes are not persisted, meaning they are
|
||||
* not stored in the zip file. The "{@code defaultOwner}" and "{@code defaultGroup}"
|
||||
* not stored in the ZIP file. The "{@code defaultOwner}" and "{@code defaultGroup}"
|
||||
* provider properties (listed below) can be used to configure the default values
|
||||
* for these attributes. If these properties are not set then the file owner
|
||||
* defaults to the owner of the zip file, and the group owner defaults to the
|
||||
* zip file's group owner (or the file owner on platforms that don't support a
|
||||
* defaults to the owner of the ZIP file, and the group owner defaults to the
|
||||
* ZIP file's group owner (or the file owner on platforms that don't support a
|
||||
* group owner).
|
||||
*
|
||||
* <p> The "{@code permissions}" attribute is not optional in the "{@code posix}"
|
||||
* view so a default set of permissions are used for entries that do not have
|
||||
* access permissions stored in the Zip file. The default set of permissions
|
||||
* access permissions stored in the ZIP file. The default set of permissions
|
||||
* are
|
||||
* <ul>
|
||||
* <li>{@link PosixFilePermission#OWNER_READ OWNER_READ}</li>
|
||||
|
@ -129,14 +129,14 @@ import java.util.Set;
|
|||
* The default permissions can be configured with the "{@code defaultPermissions}"
|
||||
* property described below.
|
||||
*
|
||||
* <h2>Zip File System Properties</h2>
|
||||
* <h2>ZIP File System Properties</h2>
|
||||
*
|
||||
* The following properties may be specified when creating a Zip
|
||||
* file system:
|
||||
* <table class="striped">
|
||||
* <caption style="display:none">
|
||||
* Configurable properties that may be specified when creating
|
||||
* a new Zip file system
|
||||
* a new ZIP file system
|
||||
* </caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
|
@ -153,8 +153,8 @@ import java.util.Set;
|
|||
* <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.
|
||||
* 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>
|
||||
|
@ -163,7 +163,7 @@ import java.util.Set;
|
|||
* <td>UTF-8</td>
|
||||
* <td>
|
||||
* The value indicates the encoding scheme for the
|
||||
* names of the entries in the Zip or JAR file.
|
||||
* names of the entries in the ZIP or JAR file.
|
||||
* </td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
|
@ -171,7 +171,7 @@ import java.util.Set;
|
|||
* <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
|
||||
* If the value is {@code true}, the ZIP file system will support
|
||||
* the {@link java.nio.file.attribute.PosixFileAttributeView PosixFileAttributeView}.
|
||||
* </td>
|
||||
* </tr>
|
||||
|
@ -181,7 +181,7 @@ import java.util.Set;
|
|||
* {@link java.lang.String}</td>
|
||||
* <td>null/unset</td>
|
||||
* <td>
|
||||
* Override the default owner for entries in the Zip file system.<br>
|
||||
* 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>
|
||||
|
@ -191,7 +191,7 @@ import java.util.Set;
|
|||
* {@link java.lang.String}</td>
|
||||
* <td>null/unset</td>
|
||||
* <td>
|
||||
* Override the default group for entries in the Zip file system.<br>
|
||||
* Override 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>
|
||||
|
@ -201,7 +201,7 @@ import java.util.Set;
|
|||
* 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>
|
||||
* Override the default Set of permissions for entries in the ZIP file system.<br>
|
||||
* The value can be a {@link java.util.Set Set}<{@link java.nio.file.attribute.PosixFilePermission PosixFilePermission}> or<br>
|
||||
* a String that is parsed by {@link java.nio.file.attribute.PosixFilePermissions#fromString PosixFilePermissions::fromString}
|
||||
* </td>
|
||||
|
@ -212,16 +212,16 @@ import java.util.Set;
|
|||
* <td>"DEFLATED"</td>
|
||||
* <td>
|
||||
* The value representing the compression method to use when writing entries
|
||||
* to the Zip file system.
|
||||
* 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.
|
||||
* 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.
|
||||
* 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
|
||||
|
@ -270,7 +270,7 @@ import java.util.Set;
|
|||
*
|
||||
* <h2>Examples:</h2>
|
||||
*
|
||||
* Construct a new Zip file system that is identified by a URI. If the Zip file does not exist,
|
||||
* Construct a new ZIP file system that is identified by a URI. If the ZIP file does not exist,
|
||||
* it will be created:
|
||||
* <pre>
|
||||
* {@code
|
||||
|
@ -281,7 +281,7 @@ import java.util.Set;
|
|||
* }
|
||||
* </pre>
|
||||
*
|
||||
* Construct a new Zip file system that is identified by specifying a path
|
||||
* Construct a new ZIP file system that is identified by specifying a path
|
||||
* and using automatic file type detection. Iterate from the root of the JAR displaying each
|
||||
* found entry:
|
||||
* <pre>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue