public class SftpDirectoryStream extends java.lang.Object implements SftpClientHolder, java.nio.file.DirectoryStream<java.nio.file.Path>
DirectoryStream| Modifier and Type | Field and Description |
|---|---|
private java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> |
filter |
private SftpPath |
path |
protected SftpPathIterator |
pathIterator |
private SftpClient |
sftp |
| Constructor and Description |
|---|
SftpDirectoryStream(SftpPath path) |
SftpDirectoryStream(SftpPath path,
java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
SftpClient |
getClient() |
java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> |
getFilter() |
SftpPath |
getRootPath() |
java.util.Iterator<java.nio.file.Path> |
iterator() |
protected SftpPathIterator pathIterator
private final SftpPath path
private final java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter
private final SftpClient sftp
public SftpDirectoryStream(SftpPath path) throws java.io.IOException
path - The remote SftpPathjava.io.IOException - If failed to initialize the directory access handlepublic SftpDirectoryStream(SftpPath path, java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter) throws java.io.IOException
path - The remote SftpPathfilter - An optional filter - ignored if
nulljava.io.IOException - If failed to initialize the directory access handlepublic final SftpClient getClient()
getClient in interface SftpClientHolderpublic final SftpPath getRootPath()
SftpPath for this directory streampublic final java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> getFilter()
null to indicate no filterpublic java.util.Iterator<java.nio.file.Path> iterator()
iterator in interface java.lang.Iterable<java.nio.file.Path>iterator in interface java.nio.file.DirectoryStream<java.nio.file.Path>public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException