cz.dhl.ftp
Class FtpListInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended bycz.dhl.ftp.FtpInputStream
          extended bycz.dhl.ftp.FtpListInputStream

public final class FtpListInputStream
extends FtpInputStream

Allows to list FTP directory.

Version:
0.72 08/10/2003
Author:
Bea Petrovicova, Bea Petrovicova

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

FtpListInputStream

public FtpListInputStream(FtpFile dir)
                   throws java.io.IOException
Open 'list' or 'name list' InputStream for given directory.

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.

Parameters:
dir - directory to be listed
Throws:
java.io.IOException - socket error
FileNotFoundException - server directory not found


Available from sourceforge http://sourceforge.net/projects/jvftp under the terms of GNU Lesser General Public License (LGPL).