jdk/src/share/classes/java/nio/file/DirectoryStream.java
author alanb
Sun, 15 Feb 2009 12:25:54 +0000
changeset 2057 3acf8e5e2ca0
child 2072 80dfe4469bbd
permissions -rw-r--r--
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99 4313887: New I/O: Improved filesystem interface 4607272: New I/O: Support asynchronous I/O Reviewed-by: sherman, chegar
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2057
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
     1
/*
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
     2
 * Copyright 2007-2009 Sun Microsystems, Inc.  All Rights Reserved.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
     4
 *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    10
 *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    15
 * accompanied this code).
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    16
 *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    20
 *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    23
 * have any questions.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    24
 */
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    25
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    26
package java.nio.file;
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    27
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    28
import java.util.Iterator;
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    29
import java.io.Closeable;
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    30
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    31
/**
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    32
 * An object to iterate over the entries in a directory. A directory stream
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    33
 * allows for convenient use of the for-each construct:
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    34
 * <pre>
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    35
 *   Path dir = ...
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    36
 *   DirectoryStream&lt;Path&gt; stream = dir.newDirectoryStream();
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    37
 *   try {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    38
 *       for (Path entry: stream) {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    39
 *         ..
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    40
 *       }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    41
 *   } finally {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    42
 *       stream.close();
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    43
 *   }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    44
 * </pre>
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    45
 *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    46
 * <p><b> A {@code DirectoryStream} is not a general-purpose {@code Iterable}.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    47
 * While this interface extends {@code Iterable}, the {@code iterator} method
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    48
 * may only be invoked once to obtain the iterator; a second, or subsequent,
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    49
 * call to the {@code iterator} method throws {@code IllegalStateException}. </b>
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    50
 *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    51
 * <p> A {@code DirectoryStream} is opened upon creation and is closed by
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    52
 * invoking the {@link #close close} method. Closing the directory stream
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    53
 * releases any resources associated with the stream. The {@link
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    54
 * Files#withDirectory Files.withDirectory} utility method is useful for cases
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    55
 * where a task is performed on entries in a directory. This method automatically
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    56
 * closes the directory stream when iteration is complete (or an error occurs).
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    57
 * Once a directory stream is closed, all further method invocations on the
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    58
 * iterator throw {@link java.util.concurrent.ConcurrentModificationException}
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    59
 * with cause {@link ClosedDirectoryStreamException}.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    60
 *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    61
 * <p> A directory stream is not required to be <i>asynchronously closeable</i>.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    62
 * If a thread is blocked on the directory stream's iterator, reading from the
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    63
 * directory, and another thread invokes the {@code close} method then it may
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    64
 * require to block until the read operation is complete.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    65
 *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    66
 * <p> The {@link Iterator#hasNext() hasNext} and {@link Iterator#next() next}
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    67
 * methods can encounter an I/O error when iterating over the directory in which
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    68
 * case {@code ConcurrentModificationException} is thrown with cause
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    69
 * {@link java.io.IOException}. The {@code hasNext} method is guaranteed to
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    70
 * read-ahead by at least one element. This means that if the {@code hasNext}
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    71
 * method returns {@code true} and is followed by a call to the {@code next}
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    72
 * method then it is guaranteed not to fail with a {@code
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    73
 * ConcurrentModificationException}.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    74
 *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    75
 * <p> The elements returned by the iterator are in no specific order. Some file
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    76
 * systems maintain special links to the directory itself and the directory's
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    77
 * parent directory. Entries representing these links are not returned by the
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    78
 * iterator.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    79
 *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    80
 * <p> The iterator's {@link Iterator#remove() remove} method removes the
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    81
 * directory entry for the last element returned by the iterator, as if by
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    82
 * invoking the {@link FileRef#delete delete} method. If an I/O error or
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    83
 * security exception occurs then {@code ConcurrentModificationException} is
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    84
 * thrown with the cause.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    85
 *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    86
 * <p> The iterator is <i>weakly consistent</i>. It is thread safe but does not
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    87
 * freeze the directory while iterating, so it may (or may not) reflect updates
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    88
 * to the directory that occur after the {@code DirectoryStream} is created.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    89
 *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    90
 * @param   <T>     The type of element returned by the iterator
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    91
 *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    92
 * @since 1.7
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    93
 *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    94
 * @see Path#newDirectoryStream
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    95
 */
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    96
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    97
public interface DirectoryStream<T>
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    98
    extends Closeable, Iterable<T>
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    99
{
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   100
    /**
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   101
     * An interface that is implemented by objects that decide if a directory
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   102
     * entry should be accepted or filtered. A {@code Filter} is passed as the
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   103
     * parameter to the {@link Path#newDirectoryStream(DirectoryStream.Filter)
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   104
     * newDirectoryStream} method when opening a directory to iterate over the
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   105
     * entries in the directory.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   106
     *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   107
     * <p> The {@link DirectoryStreamFilters} class defines factory methods to
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   108
     * create filters for a number of common usages and also methods to combine
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   109
     * filters.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   110
     *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   111
     * @param   <T>     The type of the directory entry
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   112
     *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   113
     * @since 1.7
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   114
     */
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   115
    public static interface Filter<T> {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   116
        /**
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   117
         * Decides if the given directory entry should be accepted or filtered.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   118
         *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   119
         * @param   entry
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   120
         *          The directory entry to be tested
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   121
         *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   122
         * @return  {@code true} if the directory entry should be accepted
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   123
         */
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   124
        boolean accept(T entry);
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   125
    }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   126
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   127
    /**
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   128
     * Returns the iterator associated with this {@code DirectoryStream}.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   129
     *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   130
     * @return  The iterator associated with this {@code DirectoryStream}
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   131
     *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   132
     * @throws  IllegalStateException
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   133
     *          If this directory stream is closed or the iterator has already
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   134
     *          been returned
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   135
     */
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   136
    @Override
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   137
    Iterator<T> iterator();
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   138
}