public class SftpDirEntryIterator extends AbstractLoggingBean implements Iterator<SftpClient.DirEntry>, Channel
log| Constructor and Description |
|---|
SftpDirEntryIterator(SftpClient client,
String path) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
SftpClient |
getClient()
The client instance
|
String |
getPath()
The remotely accessed directory path
|
boolean |
hasNext() |
boolean |
isOpen() |
protected List<SftpClient.DirEntry> |
load(SftpClient.CloseableHandle handle) |
SftpClient.DirEntry |
next() |
protected SftpClient.CloseableHandle |
open(String path) |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic SftpDirEntryIterator(SftpClient client, String path)
client - The SftpClient instance to use for the iterationpath - The remote directory pathpublic final SftpClient getClient()
SftpClient instance used to access the remote filepublic final String getPath()
public boolean hasNext()
hasNext in interface Iterator<SftpClient.DirEntry>public SftpClient.DirEntry next()
next in interface Iterator<SftpClient.DirEntry>public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ChannelIOExceptionprotected SftpClient.CloseableHandle open(String path)
protected List<SftpClient.DirEntry> load(SftpClient.CloseableHandle handle)
public void remove()
remove in interface Iterator<SftpClient.DirEntry>Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.