|
NIO2 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.classpath.icedtea.java.nio.file.SimpleFileVisitor<T>
T - The type of reference to the filespublic class SimpleFileVisitor<T extends FileRef>
A simple visitor of files with default behavior to visit all files and to re-throw I/O errors.
Methods in this class may be overridden subject to their general contract.
| Constructor Summary | |
|---|---|
protected |
SimpleFileVisitor()
Initializes a new instance of this class. |
| Method Summary | |
|---|---|
FileVisitResult |
postVisitDirectory(T dir,
java.io.IOException exc)
Invoked for a directory after entries in the directory, and all of their descendants, have been visited. |
FileVisitResult |
preVisitDirectory(T dir)
Invoked for a directory before entries in the directory are visited. |
FileVisitResult |
preVisitDirectoryFailed(T dir,
java.io.IOException exc)
Invoked for a directory that could not be opened. |
FileVisitResult |
visitFile(T file,
BasicFileAttributes attrs)
Invoked for a file in a directory. |
FileVisitResult |
visitFileFailed(T file,
java.io.IOException exc)
Invoked for a file when its basic file attributes could not be read. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected SimpleFileVisitor()
| Method Detail |
|---|
public FileVisitResult preVisitDirectory(T dir)
Unless overridden, this method returns CONTINUE.
preVisitDirectory in interface FileVisitor<T extends FileRef>dir - A reference to the directory
public FileVisitResult preVisitDirectoryFailed(T dir,
java.io.IOException exc)
Unless overridden, this method throws IOError with the I/O
exception as cause.
preVisitDirectoryFailed in interface FileVisitor<T extends FileRef>dir - A reference to the directoryexc - The I/O exception thrown from the attempt to open the directory
java.io.IOError - With the I/O exception thrown when the attempt to open the
directory failed
public FileVisitResult visitFile(T file,
BasicFileAttributes attrs)
Unless overridden, this method returns CONTINUE.
visitFile in interface FileVisitor<T extends FileRef>file - A reference to the fileattrs - The file's basic attributes
public FileVisitResult visitFileFailed(T file,
java.io.IOException exc)
Unless overridden, this method throws IOError with the I/O
exception as cause.
visitFileFailed in interface FileVisitor<T extends FileRef>file - A reference to the fileexc - The I/O exception thrown from the attempt to read the file
attributes
java.io.IOError - With the I/O exception thrown when the attempt to read the file
attributes failed
public FileVisitResult postVisitDirectory(T dir,
java.io.IOException exc)
Unless overridden, this method returns CONTINUE if the directory iteration completes without an I/O exception;
otherwise this method throws IOError with the I/O exception as
cause.
postVisitDirectory in interface FileVisitor<T extends FileRef>dir - A reference to the directoryexc - null if the iteration of the directory completes without
an error; otherwise the I/O exception that caused the iteration
of the directory to complete prematurely
java.io.IOError - If iteration of the directory completed prematurely due to an
I/O error
|
NIO2 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 2010 Sun Microsystems, Inc. All rights reserved. Use is subject to the terms of the GNU General Public License.