T - the type used by the concrete subclass to keep track of statepublic abstract class AbstractFileSubtreeWalker<T> extends Object
| Constructor and Description |
|---|
AbstractFileSubtreeWalker() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract T |
handleDirectory(URL dir,
T state)
Handles encountering a directory.
|
protected abstract void |
handleFile(URL f,
T state)
Handles encountering a file.
|
void |
walkSubtree(URL url,
T state)
Walks a subtree starting from a specified file or directory.
|
public void walkSubtree(URL url, T state)
f - a file or directorystate - the state managed by the callerprotected abstract T handleDirectory(URL dir, T state) throws Exception
dir - the directory encounteredstate - the current walking stateException - if there is an error processing the directoryprotected abstract void handleFile(URL f, T state) throws Exception
f - the file encounteredstate - the current walking stateException - if there is an error processing the fileCopyright © 2020. All rights reserved.