equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
26 /** |
26 /** |
27 * Defines channels, which represent connections to entities that are capable of |
27 * Defines channels, which represent connections to entities that are capable of |
28 * performing I/O operations, such as files and sockets; defines selectors, for |
28 * performing I/O operations, such as files and sockets; defines selectors, for |
29 * multiplexed, non-blocking I/O operations. |
29 * multiplexed, non-blocking I/O operations. |
30 * |
30 * |
31 * <a name="channels"></a> |
31 * <a id="channels"></a> |
32 * |
32 * |
33 * <blockquote><table cellspacing=1 cellpadding=0 summary="Lists channels and their descriptions"> |
33 * <blockquote><table cellspacing=1 cellpadding=0 summary="Lists channels and their descriptions"> |
34 * <tr><th align="left">Channels</th><th align="left">Description</th></tr> |
34 * <tr><th align="left">Channels</th><th align="left">Description</th></tr> |
35 * <tr><td valign=top><i>{@link java.nio.channels.Channel}</i></td> |
35 * <tr><td valign=top><i>{@link java.nio.channels.Channel}</i></td> |
36 * <td>A nexus for I/O operations</td></tr> |
36 * <td>A nexus for I/O operations</td></tr> |
134 * getChannel} method of a {@link java.io.FileInputStream}, {@link |
134 * getChannel} method of a {@link java.io.FileInputStream}, {@link |
135 * java.io.FileOutputStream}, or {@link java.io.RandomAccessFile} to return a |
135 * java.io.FileOutputStream}, or {@link java.io.RandomAccessFile} to return a |
136 * file channel connected to the same underlying file as the {@link java.io} |
136 * file channel connected to the same underlying file as the {@link java.io} |
137 * class. |
137 * class. |
138 * |
138 * |
139 * <a name="multiplex"></a> |
139 * <a id="multiplex"></a> |
140 * <blockquote><table cellspacing=1 cellpadding=0 summary="Lists multiplexed, non-blocking channels and their descriptions"> |
140 * <blockquote><table cellspacing=1 cellpadding=0 summary="Lists multiplexed, non-blocking channels and their descriptions"> |
141 * <tr><th align="left">Multiplexed, non-blocking I/O</th><th align="left"><p>Description</th></tr> |
141 * <tr><th align="left">Multiplexed, non-blocking I/O</th><th align="left"><p>Description</th></tr> |
142 * <tr><td valign=top>{@link java.nio.channels.SelectableChannel}</td> |
142 * <tr><td valign=top>{@link java.nio.channels.SelectableChannel}</td> |
143 * <td>A channel that can be multiplexed</td></tr> |
143 * <td>A channel that can be multiplexed</td></tr> |
144 * <tr><td valign=top> {@link java.nio.channels.DatagramChannel}</td> |
144 * <tr><td valign=top> {@link java.nio.channels.DatagramChannel}</td> |
220 * only the {@link java.nio.channels.spi.AbstractSelector} and {@link |
220 * only the {@link java.nio.channels.spi.AbstractSelector} and {@link |
221 * java.nio.channels.spi.AbstractSelectionKey} classes should be subclassed |
221 * java.nio.channels.spi.AbstractSelectionKey} classes should be subclassed |
222 * directly; custom channel classes should extend the appropriate {@link |
222 * directly; custom channel classes should extend the appropriate {@link |
223 * java.nio.channels.SelectableChannel} subclasses defined in this package. |
223 * java.nio.channels.SelectableChannel} subclasses defined in this package. |
224 * |
224 * |
225 * <a name="async"></a> |
225 * <a id="async"></a> |
226 * |
226 * |
227 * <blockquote><table cellspacing=1 cellpadding=0 summary="Lists asynchronous channels and their descriptions"> |
227 * <blockquote><table cellspacing=1 cellpadding=0 summary="Lists asynchronous channels and their descriptions"> |
228 * <tr><th align="left">Asynchronous I/O</th><th align="left">Description</th></tr> |
228 * <tr><th align="left">Asynchronous I/O</th><th align="left">Description</th></tr> |
229 * <tr><td valign=top>{@link java.nio.channels.AsynchronousFileChannel}</td> |
229 * <tr><td valign=top>{@link java.nio.channels.AsynchronousFileChannel}</td> |
230 * <td>An asynchronous channel for reading, writing, and manipulating a file</td></tr> |
230 * <td>An asynchronous channel for reading, writing, and manipulating a file</td></tr> |