Top Fields Constructors Methods
org.apache.sshd.sftp.server

public Class DirectoryHandle

extends Handle
implements Iterator<Path>
Class Inheritance
All Implemented Interfaces
java.util.Iterator
Imports
java.io.IOException, java.nio.file.DirectoryStream, .Path, java.util.Iterator

Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
private boolean
private DirectoryStream<Path>
private Iterator<Path>
private boolean
private boolean

Constructor Summary

AccessConstructor and Description
public
DirectoryHandle(SftpSubsystem subsystem, Path dir, String handle)

Method Summary

Modifier and TypeMethod and Description
public void
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

public boolean
public boolean
public boolean
public void
public void
public void
public Path
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.

public void
remove()

Overrides default java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation).

Inherited from org.apache.sshd.sftp.server.Handle:
attributeKeysclearAttributescomputeAttributeIfAbsentgetAttributegetAttributesCountgetFilegetFileHandlegetSubsystemisOpenremoveAttributesafesetAttributesignalHandleOpensignalHandleOpeningtoString

Field Detail

doneback to summary
private boolean done
dsback to summary
private DirectoryStream<Path> ds
fileListback to summary
private Iterator<Path> fileList
sendDotback to summary
private boolean sendDot
sendDotDotback to summary
private boolean sendDotDot

Constructor Detail

DirectoryHandleback to summary
public DirectoryHandle(SftpSubsystem subsystem, Path dir, String handle) throws IOException

Method Detail

closeback to summary
public void close() throws IOException

Overrides org.apache.sshd.sftp.server.Handle.close.

Implements java.nio.channels.Channel.close.

Doc from java.nio.channels.Channel.close.

Closes this channel.

After a channel is closed, any further attempt to invoke I/O operations upon it will cause a ClosedChannelException to be thrown.

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.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
isDoneback to summary
public boolean isDone()
isSendDotback to summary
public boolean isSendDot()
isSendDotDotback to summary
public boolean isSendDotDot()
markDoneback to summary
public void markDone()
markDotDotSentback to summary
public void markDotDotSent()
markDotSentback to summary
public void markDotSent()
nextback to summary
public Path next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:Path

the next element in the iteration

Annotations
@Override
removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Doc from java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to next.

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 forEachRemaining method.

Annotations
@Override