Class SftpDirectoryStream
- java.lang.Object
-
- org.apache.sshd.client.subsystem.sftp.fs.SftpDirectoryStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.lang.Iterable<java.nio.file.Path>,java.nio.file.DirectoryStream<java.nio.file.Path>
public class SftpDirectoryStream extends java.lang.Object implements java.nio.file.DirectoryStream<java.nio.file.Path>Implements a remoteDirectoryStream
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Iterable<SftpClient.DirEntry>iterprivate SftpPathpprivate SftpClientsftp
-
Constructor Summary
Constructors Constructor Description SftpDirectoryStream(SftpPath path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()SftpClientgetClient()Client instance used to access the remote directoryjava.util.Iterator<java.nio.file.Path>iterator()
-
-
-
Field Detail
-
sftp
private final SftpClient sftp
-
iter
private final java.lang.Iterable<SftpClient.DirEntry> iter
-
p
private final SftpPath p
-
-
Method Detail
-
getClient
public final SftpClient getClient()
Client instance used to access the remote directory- Returns:
- The
SftpClientinstance used to access the remote directory
-
iterator
public java.util.Iterator<java.nio.file.Path> iterator()
- Specified by:
iteratorin interfacejava.nio.file.DirectoryStream<java.nio.file.Path>- Specified by:
iteratorin interfacejava.lang.Iterable<java.nio.file.Path>
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-