java.lang.Objectjava.io.InputStream
cz.dhl.ftp.FtpInputStream
cz.dhl.ftp.FtpListInputStream
Allows to list FTP directory.
| Constructor Summary | |
FtpListInputStream(FtpFile dir)
Open 'list' or 'name list' InputStream for given directory. |
|
| Methods inherited from class cz.dhl.ftp.FtpInputStream |
available, close, mark, markSupported, read, read, read, reset, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FtpListInputStream(FtpFile dir)
throws java.io.IOException
LIST - list
This command causes a list to be sent from the server to the passive DTP. If the pathname specifies a directory or other group of files, the server should transfer a list of files in the specified directory. If the pathname specifies a file then the server should send current information on the file. A null argument implies the user's current working or default directory. The data transfer is over the data connection in type ASCII. Since the information on a file may vary widely from system to system, this information may be hard to use automatically in a program, but may be quite useful to a human user.
NLST - name list
This command causes a directory listing to be sent from server to user site. The pathname should specify a directory or other system-specific file group descriptor; a null argument implies the current directory. The server will return a stream of names of files and no other information. The data will be transferred in ASCII type over the data connection as valid pathname strings separated by [CRLF] or [NL]. This command is intended to return information that can be used by a program to further process the files automatically, for example in the implementation of a "multiple get" function.
dir - directory to be listed
java.io.IOException - socket error
FileNotFoundException - server directory not found