Note
if the iteration is carried out until no more entries are available, then no need to close the iterator. Otherwise, it is recommended to close it so as to release the internal handle.
| Modifier and Type | Field and Description |
|---|---|
| private final SftpClient | |
| private final boolean | |
| private List | |
| private SftpClient. | |
| private final String | |
| private final AtomicReference | |
| private int | |
| private final AtomicBoolean |
| Access | Constructor and Description |
|---|---|
| public | SftpDirEntryIterator(SftpClient
The client, String SftpClient instance to use for the iterationThe remote directory path path)
|
| public | SftpDirEntryIterator(SftpClient
The client, SftpClient.SftpClient instance to use for the iterationThe directory dirHandleHandle to use for listing the entries
|
| public | SftpDirEntryIterator(SftpClient
The client, String SftpClient instance to use for the iterationA hint as to the remote directory path - used only for logging path, SftpClient.The directory dirHandle,Handle to use for listing the entriesIf closeOnFinished)true then close the directory handle when all entries have been exhausted
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public final SftpClient | |
| public final SftpClient. | |
| public final String | |
| public boolean | |
| public boolean | |
| public boolean | |
| protected List | |
| public SftpClient. | |
| public void | remove()
Overrides default java. Removes from the underlying collection the last element returned by this iterator (optional operation). |
| client | back to summary |
|---|---|
| private final SftpClient client | |
| closeOnFinished | back to summary |
|---|---|
| private final boolean closeOnFinished | |
| dirEntries | back to summary |
|---|---|
| private List<SftpClient. | |
| dirHandle | back to summary |
|---|---|
| private SftpClient. | |
| dirPath | back to summary |
|---|---|
| private final String dirPath | |
| eolIndicator | back to summary |
|---|---|
| private final AtomicReference<Boolean> eolIndicator | |
| index | back to summary |
|---|---|
| private int index | |
| open | back to summary |
|---|---|
| private final AtomicBoolean open | |
| SftpDirEntryIterator | back to summary |
|---|---|
public SftpDirEntryIterator(SftpClient client, String path) throws IOException
| |
| SftpDirEntryIterator | back to summary |
|---|---|
public SftpDirEntryIterator(SftpClient client, SftpClient.
| |
| SftpDirEntryIterator | back to summary |
|---|---|
public SftpDirEntryIterator(SftpClient client, String path, SftpClient.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Doc from java. Closes this channel. After a channel is closed, any further attempt to invoke I/O
operations upon it will cause a If this channel is already closed then invoking this method has no effect. This method may be invoked at any time. If some other thread has already invoked it, however, then another invocation will block until the first invocation is complete, after which it will return without effect.
| |
| getClient | back to summary |
|---|---|
| public final SftpClient getClient() Implements org.
| |
| getHandle | back to summary |
|---|---|
public final SftpClient.
| |
| getPath | back to summary |
|---|---|
| public final String getPath() The remotely accessed directory path | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| isCloseOnFinished | back to summary |
|---|---|
| public boolean isCloseOnFinished() | |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() Implements java. Doc from java. Tells whether or not this channel is open.
| |
| load | back to summary |
|---|---|
| protected List | |
| next | back to summary |
|---|---|
| public SftpClient. Implements java. Doc from java. Returns the next element in the iteration.
| |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the
| |