8185994: Fix a11y and HTML issues in the java.base/java.io and java.base/java.nio packages
Reviewed-by: bpb, smarks
This commit is contained in:
parent
2f31db126d
commit
330008fbf2
@ -54,83 +54,90 @@ package java.io;
|
||||
* Unicode strings in a format that is a slight modification of UTF-8.
|
||||
* (For information regarding the standard UTF-8 format, see section
|
||||
* <i>3.9 Unicode Encoding Forms</i> of <i>The Unicode Standard, Version
|
||||
* 4.0</i>).
|
||||
* Note that in the following table, the most significant bit appears in the
|
||||
* far left-hand column.
|
||||
* 4.0</i>)
|
||||
*
|
||||
* <blockquote>
|
||||
* <table class="plain">
|
||||
* <caption style="display:none">Bit values and bytes</caption>
|
||||
* <ul>
|
||||
* <li>Characters in the range {@code '\u005Cu0001'} to
|
||||
* {@code '\u005Cu007F'} are represented by a single byte.
|
||||
* <li>The null character {@code '\u005Cu0000'} and characters
|
||||
* in the range {@code '\u005Cu0080'} to {@code '\u005Cu07FF'} are
|
||||
* represented by a pair of bytes.
|
||||
* <li>Characters in the range {@code '\u005Cu0800'}
|
||||
* to {@code '\u005CuFFFF'} are represented by three bytes.
|
||||
* </ul>
|
||||
*
|
||||
* <table class="plain" style="margin-left:2em;">
|
||||
* <caption>Encoding of UTF-8 values</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th scope="col" rowspan="2">Value</th>
|
||||
* <th scope="col" rowspan="2">Byte</th>
|
||||
* <th scope="col" colspan="8" id="bit_a">Bit Values</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <!-- Value -->
|
||||
* <!-- Byte -->
|
||||
* <th scope="col" style="width:3em"> 7 </th>
|
||||
* <th scope="col" style="width:3em"> 6 </th>
|
||||
* <th scope="col" style="width:3em"> 5 </th>
|
||||
* <th scope="col" style="width:3em"> 4 </th>
|
||||
* <th scope="col" style="width:3em"> 3 </th>
|
||||
* <th scope="col" style="width:3em"> 2 </th>
|
||||
* <th scope="col" style="width:3em"> 1 </th>
|
||||
* <th scope="col" style="width:3em"> 0 </th>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr>
|
||||
* <th colspan="9"><span style="font-weight:normal">
|
||||
* All characters in the range {@code '\u005Cu0001'} to
|
||||
* {@code '\u005Cu007F'} are represented by a single byte:</span></th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td></td>
|
||||
* <th colspan="8" id="bit_a">Bit Values</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <th id="byte1_a" style="text-align:left">Byte 1</th>
|
||||
* <th scope="row" style="text-align:left; font-weight:normal">
|
||||
* {@code \u005Cu0001} to {@code \u005Cu007F} </th>
|
||||
* <th scope="row" style="font-weight:normal; text-align:center"> 1 </th>
|
||||
* <td style="text-align:center">0
|
||||
* <td colspan="7" style="text-align:center">bits 6-0
|
||||
* <td colspan="7" style="text-align:right; padding-right:6em">bits 6-0
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <th colspan="9"><span style="font-weight:normal">
|
||||
* The null character {@code '\u005Cu0000'} and characters
|
||||
* in the range {@code '\u005Cu0080'} to {@code '\u005Cu07FF'} are
|
||||
* represented by a pair of bytes:</span></th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td></td>
|
||||
* <th colspan="8" id="bit_b">Bit Values</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <th id="byte1_b" style="text-align:left">Byte 1</th>
|
||||
* <th scope="row" rowspan="2" style="text-align:left; font-weight:normal">
|
||||
* {@code \u005Cu0000},<br>
|
||||
* {@code \u005Cu0080} to {@code \u005Cu07FF} </th>
|
||||
* <th scope="row" style="font-weight:normal; text-align:center"> 1 </th>
|
||||
* <td style="text-align:center">1
|
||||
* <td style="text-align:center">1
|
||||
* <td style="text-align:center">0
|
||||
* <td colspan="5" style="text-align:center">bits 10-6
|
||||
* <td colspan="5" style="text-align:right; padding-right:6em">bits 10-6
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <th id="byte2_a" style="text-align:left">Byte 2</th>
|
||||
* <!-- (value) -->
|
||||
* <th scope="row" style="font-weight:normal; text-align:center"> 2 </th>
|
||||
* <td style="text-align:center">1
|
||||
* <td style="text-align:center">0
|
||||
* <td colspan="6" style="text-align:center">bits 5-0
|
||||
* <td colspan="6" style="text-align:right; padding-right:6em">bits 5-0
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <th colspan="9"><span style="font-weight:normal">
|
||||
* {@code char} values in the range {@code '\u005Cu0800'}
|
||||
* to {@code '\u005CuFFFF'} are represented by three bytes:</span></th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td></td>
|
||||
* <th colspan="8"id="bit_c">Bit Values</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <th id="byte1_c" style="text-align:left">Byte 1</th>
|
||||
* <th scope="row" rowspan="3" style="text-align:left; font-weight:normal">
|
||||
* {@code \u005Cu0800} to {@code \u005CuFFFF} </th>
|
||||
* <th scope="row" style="font-weight:normal; text-align:center"> 1 </th>
|
||||
* <td style="text-align:center">1
|
||||
* <td style="text-align:center">1
|
||||
* <td style="text-align:center">1
|
||||
* <td style="text-align:center">0
|
||||
* <td colspan="4" style="text-align:center">bits 15-12
|
||||
* <td colspan="4" style="text-align:right; padding-right:6em">bits 15-12
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <th id="byte2_b" style="text-align:left">Byte 2</th>
|
||||
* <!-- (value) -->
|
||||
* <th scope="row" style="font-weight:normal; text-align:center"> 2 </th>
|
||||
* <td style="text-align:center">1
|
||||
* <td style="text-align:center">0
|
||||
* <td colspan="6" style="text-align:center">bits 11-6
|
||||
* <td colspan="6" style="text-align:right; padding-right:6em">bits 11-6
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <th id="byte3" style="text-align:left">Byte 3</th>
|
||||
* <!-- (value) -->
|
||||
* <th scope="row" style="font-weight:normal; text-align:center"> 3 </th>
|
||||
* <td style="text-align:center">1
|
||||
* <td style="text-align:center">0
|
||||
* <td colspan="6" style="text-align:center">bits 5-0
|
||||
* <td colspan="6" style="text-align:right; padding-right:6em">bits 5-0
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* </blockquote>
|
||||
*
|
||||
* <p>
|
||||
* The differences between this format and the
|
||||
* standard UTF-8 format are the following:
|
||||
|
@ -30,46 +30,50 @@
|
||||
*
|
||||
* <a id="channels"></a>
|
||||
*
|
||||
* <blockquote><table class="borderless">
|
||||
* <table class="striped" style="text-align:left; margin-left:2em">
|
||||
* <caption style="display:none">Lists channels and their descriptions</caption>
|
||||
* <tr><th style="text-align:left">Channels</th>
|
||||
* <th style="text-align:left">Description</th></tr>
|
||||
* <tr><td style="vertical-align:top"><i>{@link java.nio.channels.Channel}</i></td>
|
||||
* <thead>
|
||||
* <tr><th scope="col">Channels</th>
|
||||
* <th scope="col">Description</th></tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><th scope="row"><i>{@link java.nio.channels.Channel}</i></th>
|
||||
* <td>A nexus for I/O operations</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.ReadableByteChannel}</i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em"><i>{@link java.nio.channels.ReadableByteChannel}</i></span></th>
|
||||
* <td>Can read into a buffer</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.ScatteringByteChannel} </i></td>
|
||||
* <td>Can read into a sequence of buffers</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.WritableByteChannel}</i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em"><i>{@link java.nio.channels.ScatteringByteChannel}</i></span></th>
|
||||
* <td>Can read into a sequence of buffers</td></tr>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em"><i>{@link java.nio.channels.WritableByteChannel}</i></span></th>
|
||||
* <td>Can write from a buffer</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.GatheringByteChannel}</i></td>
|
||||
* <td>Can write from a sequence of buffers</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.ByteChannel}</i></td>
|
||||
* <td>Can read/write to/from a buffer</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.SeekableByteChannel}</i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em"><i>{@link java.nio.channels.GatheringByteChannel}</i></span></th>
|
||||
* <td>Can write from a sequence of buffers</td></tr>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em"><i>{@link java.nio.channels.ByteChannel}</i></span></th>
|
||||
* <td>Can read/write to/from a buffer</td></tr>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em"><i>{@link java.nio.channels.SeekableByteChannel}</i></span></th>
|
||||
* <td>A {@code ByteChannel} connected to an entity that contains a variable-length
|
||||
* sequence of bytes</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.AsynchronousChannel}</i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em"><i>{@link java.nio.channels.AsynchronousChannel}</i></span></th>
|
||||
* <td>Supports asynchronous I/O operations.</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.AsynchronousByteChannel}</i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em"><i>{@link java.nio.channels.AsynchronousByteChannel}</i></span></th>
|
||||
* <td>Can read and write bytes asynchronously</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.NetworkChannel}</i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em"><i>{@link java.nio.channels.NetworkChannel}</i></span></th>
|
||||
* <td>A channel to a network socket</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.MulticastChannel}</i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em"><i>{@link java.nio.channels.MulticastChannel}</i></span></th>
|
||||
* <td>Can join Internet Protocol (IP) multicast groups</td></tr>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.channels.Channels}</td>
|
||||
* <tr><th scope="row">{@link java.nio.channels.Channels}</th>
|
||||
* <td>Utility methods for channel/stream interoperation</td></tr>
|
||||
* </table></blockquote>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
* <p> A <i>channel</i> represents an open connection to an entity such as a
|
||||
* hardware device, a file, a network socket, or a program component that is
|
||||
@ -122,21 +126,25 @@
|
||||
* be constructed that uses a given charset to encode characters into bytes and
|
||||
* write them to a given writable byte channel.
|
||||
*
|
||||
* <blockquote><table class="borderless">
|
||||
* <table class="striped" style="margin-left:2em; text-align:left">
|
||||
* <caption style="display:none">
|
||||
* Lists file channels and their descriptions</caption>
|
||||
* <tr><th style="text-align:left">File channels</th>
|
||||
* <th style="text-align:left">Description</th></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.FileChannel}</td>
|
||||
* <thead>
|
||||
* <tr><th scope="col">File channels</th>
|
||||
* <th scope="col">Description</th></tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><th scope="row">
|
||||
* {@link java.nio.channels.FileChannel}</th>
|
||||
* <td>Reads, writes, maps, and manipulates files</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.FileLock}</td>
|
||||
* <tr><th scope="row">
|
||||
* {@link java.nio.channels.FileLock}</th>
|
||||
* <td>A lock on a (region of a) file</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.MappedByteBuffer} </td>
|
||||
* <td>A direct byte buffer mapped to a region of a file</td></tr>
|
||||
* </table></blockquote>
|
||||
* <tr><th scope="row">
|
||||
* {@link java.nio.MappedByteBuffer}</th>
|
||||
* <td>A direct byte buffer mapped to a region of a file</td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
* <p> The {@link java.nio.channels.FileChannel} class supports the usual
|
||||
* operations of reading bytes from, and writing bytes to, a channel connected to
|
||||
@ -156,36 +164,40 @@
|
||||
* class.
|
||||
*
|
||||
* <a id="multiplex"></a>
|
||||
* <blockquote><table class="borderless">
|
||||
* <table class="striped" style="margin-left:2em; text-align:left">
|
||||
* <caption style="display:none">
|
||||
* Lists multiplexed, non-blocking channels and their descriptions</caption>
|
||||
* <tr><th style="text-align:left">Multiplexed, non-blocking I/O</th>
|
||||
* <th style="text-align:left">Description</th></tr>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.channels.SelectableChannel}</td>
|
||||
* <thead>
|
||||
* <tr><th scope="col">Multiplexed, non-blocking I/O</th>
|
||||
* <th scope="col">Description</th></tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><th scope="row">{@link java.nio.channels.SelectableChannel}</th>
|
||||
* <td>A channel that can be multiplexed</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.DatagramChannel}</td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em">{@link java.nio.channels.DatagramChannel}</span></th>
|
||||
* <td>A channel to a datagram-oriented socket</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.Pipe.SinkChannel}</td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em">{@link java.nio.channels.Pipe.SinkChannel}</span></th>
|
||||
* <td>The write end of a pipe</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.Pipe.SourceChannel}</td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em">{@link java.nio.channels.Pipe.SourceChannel}</span></th>
|
||||
* <td>The read end of a pipe</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.ServerSocketChannel} </td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em">{@link java.nio.channels.ServerSocketChannel}</span></th>
|
||||
* <td>A channel to a stream-oriented listening socket</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.SocketChannel}</td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em">{@link java.nio.channels.SocketChannel}</span></th>
|
||||
* <td>A channel for a stream-oriented connecting socket</td></tr>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.channels.Selector}</td>
|
||||
* <tr><th scope="row">{@link java.nio.channels.Selector}</th>
|
||||
* <td>A multiplexor of selectable channels</td></tr>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.channels.SelectionKey}</td>
|
||||
* <td>A token representing the registration <br> of a channel
|
||||
* with a selector</td></tr>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.channels.Pipe}</td>
|
||||
* <td>Two channels that form a unidirectional pipe</td></tr>
|
||||
* </table></blockquote>
|
||||
* <tr><th scope="row">{@link java.nio.channels.SelectionKey}</th>
|
||||
* <td>A token representing the registration of a channel
|
||||
* with a selector</td></tr>
|
||||
* <tr><th scope="row">{@link java.nio.channels.Pipe}</th>
|
||||
* <td>Two channels that form a unidirectional pipe</td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
* <p> Multiplexed, non-blocking I/O, which is much more scalable than
|
||||
* thread-oriented, blocking I/O, is provided by <i>selectors</i>, <i>selectable
|
||||
@ -251,27 +263,31 @@
|
||||
*
|
||||
* <a id="async"></a>
|
||||
*
|
||||
* <blockquote><table class="borderless">
|
||||
* <table class="striped" style="padding-left:2em; text-align:left">
|
||||
* <caption style="display:none">
|
||||
* Lists asynchronous channels and their descriptions</caption>
|
||||
* <tr><th style="text-align:left">
|
||||
* Asynchronous I/O</th><th style="text-align:left">Description</th></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.AsynchronousFileChannel}</td>
|
||||
* <thead>
|
||||
* <tr><th scope="col">Asynchronous I/O</th>
|
||||
* <th scope="col">Description</th></tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><th scope="row">
|
||||
* {@link java.nio.channels.AsynchronousFileChannel}</th>
|
||||
* <td>An asynchronous channel for reading, writing, and manipulating a file</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.AsynchronousSocketChannel}</td>
|
||||
* <tr><th scope="row">
|
||||
* {@link java.nio.channels.AsynchronousSocketChannel}</th>
|
||||
* <td>An asynchronous channel to a stream-oriented connecting socket</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.AsynchronousServerSocketChannel} </td>
|
||||
* <tr><th scope="row">
|
||||
* {@link java.nio.channels.AsynchronousServerSocketChannel}</th>
|
||||
* <td>An asynchronous channel to a stream-oriented listening socket</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.CompletionHandler}</td>
|
||||
* <tr><th scope="row">
|
||||
* {@link java.nio.channels.CompletionHandler}</th>
|
||||
* <td>A handler for consuming the result of an asynchronous operation</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.AsynchronousChannelGroup}</td>
|
||||
* <tr><th scope="row">
|
||||
* {@link java.nio.channels.AsynchronousChannelGroup}</th>
|
||||
* <td>A grouping of asynchronous channels for the purpose of resource sharing</td></tr>
|
||||
* </table></blockquote>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
* <p> {@link java.nio.channels.AsynchronousChannel Asynchronous channels} are a
|
||||
* special type of channel capable of asynchronous I/O operations. Asynchronous
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2017, 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
|
||||
@ -27,22 +27,25 @@
|
||||
* Defines charsets, decoders, and encoders, for translating between
|
||||
* bytes and Unicode characters.
|
||||
*
|
||||
* <blockquote><table class="borderless">
|
||||
* <table class="striped" style="margin-left:2em; text-align:left">
|
||||
* <caption style="display:none">Summary of charsets, decoders, and encoders in this package</caption>
|
||||
* <tr><th style="text-align:left">Class name</th>
|
||||
* <th style="text-align:left"><th>DescriptiPath
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.charset.Charset}</td>
|
||||
* <td>A named mapping between characters<br>and bytes</td></tr>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.charset.CharsetDecoder}</td>
|
||||
* <thead>
|
||||
* <tr><th scope="col">Class name</th>
|
||||
* <th scope="col">Description
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><th scope="row">{@link java.nio.charset.Charset}</th>
|
||||
* <td>A named mapping between characters and bytes</td></tr>
|
||||
* <tr><th scope="row">{@link java.nio.charset.CharsetDecoder}</th>
|
||||
* <td>Decodes bytes into characters</td></tr>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.charset.CharsetEncoder}</td>
|
||||
* <tr><th scope="row">{@link java.nio.charset.CharsetEncoder}</th>
|
||||
* <td>Encodes characters into bytes</td></tr>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.charset.CoderResult}</td>
|
||||
* <tr><th scope="row">{@link java.nio.charset.CoderResult}</th>
|
||||
* <td>Describes coder results</td></tr>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.charset.CodingErrorAction}</td>
|
||||
* <td>Describes actions to take when<br>coding errors are detected</td></tr>
|
||||
*
|
||||
* </table></blockquote>
|
||||
* <tr><th scope="row">{@link java.nio.charset.CodingErrorAction}</th>
|
||||
* <td>Describes actions to take when coding errors are detected</td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
* <p> A <i>charset</i> is named mapping between sequences of
|
||||
* sixteen-bit Unicode characters and sequences of bytes, in the sense
|
||||
|
@ -314,45 +314,49 @@ public abstract class FileSystem
|
||||
* representation of the path is matched using a limited pattern language
|
||||
* that resembles regular expressions but with a simpler syntax. For example:
|
||||
*
|
||||
* <blockquote>
|
||||
* <table class="borderless">
|
||||
* <table class="striped" style="text-align:left; margin-left:2em">
|
||||
* <caption style="display:none">Pattern Language</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th scope="col">Example
|
||||
* <th scope="col">Description
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr>
|
||||
* <td>{@code *.java}</td>
|
||||
* <th scope="row">{@code *.java}</th>
|
||||
* <td>Matches a path that represents a file name ending in {@code .java}</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>{@code *.*}</td>
|
||||
* <th scope="row">{@code *.*}</th>
|
||||
* <td>Matches file names containing a dot</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>{@code *.{java,class}}</td>
|
||||
* <th scope="row">{@code *.{java,class}}</th>
|
||||
* <td>Matches file names ending with {@code .java} or {@code .class}</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>{@code foo.?}</td>
|
||||
* <th scope="row">{@code foo.?}</th>
|
||||
* <td>Matches file names starting with {@code foo.} and a single
|
||||
* character extension</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>/home/*/*</code>
|
||||
* <th scope="row"><code>/home/*/*</code>
|
||||
* <td>Matches <code>/home/gus/data</code> on UNIX platforms</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>/home/**</code>
|
||||
* <th scope="row"><code>/home/**</code>
|
||||
* <td>Matches <code>/home/gus</code> and
|
||||
* <code>/home/gus/data</code> on UNIX platforms</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>C:\\*</code>
|
||||
* <th scope="row"><code>C:\\*</code>
|
||||
* <td>Matches <code>C:\foo</code> and <code>C:\bar</code> on the Windows
|
||||
* platform (note that the backslash is escaped; as a string literal in the
|
||||
* Java Language the pattern would be <code>"C:\\\\*"</code>) </td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* </blockquote>
|
||||
*
|
||||
* <p> The following rules are used to interpret glob patterns:
|
||||
*
|
||||
|
@ -1923,30 +1923,33 @@ public final class Files {
|
||||
* <p> The following examples demonstrate possible values for the {@code
|
||||
* attributes} parameter:
|
||||
*
|
||||
* <blockquote>
|
||||
* <table class="borderless">
|
||||
* <table class="striped" style="text-align: left; margin-left:2em">
|
||||
* <caption style="display:none">Possible values</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th scope="col">Example
|
||||
* <th scope="col">Description
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr>
|
||||
* <td> {@code "*"} </td>
|
||||
* <th scope="row"> {@code "*"} </th>
|
||||
* <td> Read all {@link BasicFileAttributes basic-file-attributes}. </td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td> {@code "size,lastModifiedTime,lastAccessTime"} </td>
|
||||
* <th scope="row"> {@code "size,lastModifiedTime,lastAccessTime"} </th>
|
||||
* <td> Reads the file size, last modified time, and last access time
|
||||
* attributes. </td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td> {@code "posix:*"} </td>
|
||||
* <th scope="row"> {@code "posix:*"} </th>
|
||||
* <td> Read all {@link PosixFileAttributes POSIX-file-attributes}. </td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td> {@code "posix:permissions,owner,size"} </td>
|
||||
* <th scope="row"> {@code "posix:permissions,owner,size"} </th>
|
||||
* <td> Reads the POSIX file permissions, owner, and file size. </td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* </blockquote>
|
||||
*
|
||||
* <p> The {@code options} array may be used to indicate how symbolic links
|
||||
* are handled for the case that the file is a symbolic link. By default,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2017, 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
|
||||
@ -26,43 +26,47 @@
|
||||
/**
|
||||
* Interfaces and classes providing access to file and file system attributes.
|
||||
*
|
||||
* <blockquote><table class="borderless">
|
||||
* <table class="striped" style="padding-left:2em; text-align:left">
|
||||
* <caption style="display:none">Attribute views</caption>
|
||||
* <tr><th style="text-align:left">Attribute views</th>
|
||||
* <th style="text-align:left">Description</th></tr>
|
||||
* <tr><td><i>{@link java.nio.file.attribute.AttributeView}</i></td>
|
||||
* <thead>
|
||||
* <tr><th scope="col">Attribute views</th>
|
||||
* <th scope="col">Description</th></tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><th scope="row"><i>{@link java.nio.file.attribute.AttributeView}</i></th>
|
||||
* <td>Can read or update non-opaque values associated with objects in a file system</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.file.attribute.FileAttributeView}</i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em"><i>{@link java.nio.file.attribute.FileAttributeView}</i></span></th>
|
||||
* <td>Can read or update file attributes</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
*
|
||||
* <i>{@link java.nio.file.attribute.BasicFileAttributeView} </i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em">
|
||||
* <i>{@link java.nio.file.attribute.BasicFileAttributeView}</i></span></th>
|
||||
* <td>Can read or update a basic set of file attributes</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
*
|
||||
* <i>{@link java.nio.file.attribute.PosixFileAttributeView} </i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:3em">
|
||||
* <i>{@link java.nio.file.attribute.PosixFileAttributeView}</i></span></th>
|
||||
* <td>Can read or update POSIX defined file attributes</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
*
|
||||
* <i>{@link java.nio.file.attribute.DosFileAttributeView} </i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:3em">
|
||||
* <i>{@link java.nio.file.attribute.DosFileAttributeView}</i></span></th>
|
||||
* <td>Can read or update FAT file attributes</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
*
|
||||
* <i>{@link java.nio.file.attribute.FileOwnerAttributeView} </i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em">
|
||||
* <i>{@link java.nio.file.attribute.FileOwnerAttributeView}</i></span></th>
|
||||
* <td>Can read or update the owner of a file</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
*
|
||||
* <i>{@link java.nio.file.attribute.AclFileAttributeView} </i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:3em">
|
||||
* <i>{@link java.nio.file.attribute.AclFileAttributeView}</i></span></th>
|
||||
* <td>Can read or update Access Control Lists</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
*
|
||||
* <i>{@link java.nio.file.attribute.UserDefinedFileAttributeView} </i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em">
|
||||
* <i>{@link java.nio.file.attribute.UserDefinedFileAttributeView}</i></span></th>
|
||||
* <td>Can read or update user-defined file attributes</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em"><i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></span></th>
|
||||
* <td>Can read or update file system attributes</td></tr>
|
||||
* </table></blockquote>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
* <p> An attribute view provides a read-only or updatable view of the non-opaque
|
||||
* values, or <em>metadata</em>, associated with objects in a file system.
|
||||
|
@ -48,7 +48,7 @@
|
||||
* <li><p> <i>Selectors</i> and <i>selection keys</i>, which
|
||||
* together with <br> <i>selectable channels</i> define a <a
|
||||
* href="channels/package-summary.html#multiplex">multiplexed,
|
||||
* non-blocking <br> I/O</a> facility. </p></li>
|
||||
* non-blocking <br> I/O</a> facility. </p></li>
|
||||
*
|
||||
* </ul>
|
||||
*
|
||||
@ -62,33 +62,44 @@
|
||||
*
|
||||
* <a id="buffers"> </a>
|
||||
*
|
||||
* <blockquote><table class="borderless">
|
||||
* <table class="striped" style="margin-left:2em; text-align:left">
|
||||
* <caption style="display:none">Description of the various buffers</caption>
|
||||
* <tr><th style="text-align:left">Buffers</th>
|
||||
* <th style="text-align:left">Description</th></tr>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.Buffer}</td>
|
||||
* <thead>
|
||||
* <tr><th scope="col">Buffers</th>
|
||||
* <th scope="col">Description</th></tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><th scope="row">{@link java.nio.Buffer}</th>
|
||||
* <td>Position, limit, and capacity;
|
||||
* <br>clear, flip, rewind, and mark/reset</td></tr>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.ByteBuffer}</td>
|
||||
* <td>Get/put, compact, views; allocate, wrap</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.MappedByteBuffer} </td>
|
||||
* clear, flip, rewind, and mark/reset</td></tr>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em">{@link java.nio.ByteBuffer}</span></th>
|
||||
* <td>Get/put, compact, views; allocate, wrap</td></tr>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em">{@link java.nio.MappedByteBuffer}</span></th>
|
||||
* <td>A byte buffer mapped to a file</td></tr>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.CharBuffer}</td>
|
||||
* <td>Get/put, compact; allocate, wrap</td></tr>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.DoubleBuffer}</td>
|
||||
* <td> ' '</td></tr>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.FloatBuffer}</td>
|
||||
* <td> ' '</td></tr>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.IntBuffer}</td>
|
||||
* <td> ' '</td></tr>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.LongBuffer}</td>
|
||||
* <td> ' '</td></tr>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.ShortBuffer}</td>
|
||||
* <td> ' '</td></tr>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.ByteOrder}</td>
|
||||
* <td>Typesafe enumeration for byte orders</td></tr>
|
||||
* </table></blockquote>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em">{@link java.nio.CharBuffer}</span></th>
|
||||
* <td>Get/put, compact; allocate, wrap</td></tr>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em">{@link java.nio.DoubleBuffer}</span></th>
|
||||
* <td>Get/put, compact; allocate, wrap</td></tr>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em">{@link java.nio.FloatBuffer}</span></th>
|
||||
* <td>Get/put, compact; allocate, wrap</td></tr>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em">{@link java.nio.IntBuffer}</span></th>
|
||||
* <td>Get/put, compact; allocate, wrap</td></tr>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em">{@link java.nio.LongBuffer}</span></th>
|
||||
* <td>Get/put, compact; allocate, wrap</td></tr>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em">{@link java.nio.ShortBuffer}</span></th>
|
||||
* <td>Get/put, compact; allocate, wrap</td></tr>
|
||||
* <tr><th scope="row">{@link java.nio.ByteOrder}</th>
|
||||
* <td>Typesafe enumeration for byte orders</td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
* <p> A <i>buffer</i> is a container for a fixed amount of data of a
|
||||
* specific primitive type. In addition to its content a buffer has a
|
||||
|
Loading…
x
Reference in New Issue
Block a user