Java Doc for FTPFileList.java in  » Net » Apache-commons-net-1.4.1 » org » apache » commons » net » ftp » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » Apache commons net 1.4.1 » org.apache.commons.net.ftp 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.net.ftp.FTPFileList

FTPFileList
public class FTPFileList (Code)
This class encapsulates a listing of files from an FTP server. It is initialized with an input stream which is read and the input split into lines, each of which (after some possible initial verbiage) represents a file on the FTP server. A parser is also supplied, which is used to iterate through the internal list of lines parsing each into an FTPFile object which is returned to the caller of the iteration methods. This parser may be replaced with another, allowing the same list to be parsed with different parsers. Parsing takes place on an as-needed basis, basically, the first time a position is iterated over. This happens at the time of iteration, not prior to it as the older (FTPClient.listFiles() methods did, which required a bigger memory hit.
author:
   Steve Cohen
version:
   $Id: FTPFileList.java 165675 2005-05-02 20:09:55Z rwinston $
See Also:   org.apache.commons.net.ftp.FTPClient.createFileList
See Also:   org.apache.commons.net.ftp.FTPFileIterator
See Also:   org.apache.commons.net.ftp.FTPFileEntryParser
See Also:   org.apache.commons.net.ftp.FTPListParseEngine




Method Summary
public static  FTPFileListcreate(InputStream stream, FTPFileEntryParser parser, String encoding)
     The only way to create an FTPFileList object.
public static  FTPFileListcreate(InputStream stream, FTPFileEntryParser parser)
     The only way to create an FTPFileList object.
public  FTPFile[]getFiles()
    
 ListgetLines()
     Package private accessor for the collection of raw input lines.
 FTPFileEntryParsergetParser()
     Accessor for this object's default parser.
public  FTPFileIteratoriterator()
    
public  FTPFileIteratoriterator(FTPFileEntryParser parser)
     create an iterator over this list using the supplied parser
Parameters:
  parser - The user-supplied parser with which the list is to beiterated, may be different from this list's default parser.
public  voidreadStream(InputStream stream, String encoding)
     internal method for reading the input into the lines vector.
public  voidreadStream(InputStream stream)
     internal method for reading the input into the lines vector.



Method Detail
create
public static FTPFileList create(InputStream stream, FTPFileEntryParser parser, String encoding) throws IOException(Code)
The only way to create an FTPFileList object. Invokes the private constructor and then reads the stream supplied stream to build the intermediate array of "lines" which will later be parsed into FTPFile object.
Parameters:
  stream - The input stream created by reading the socket on whichthe output of the LIST command was returned
Parameters:
  parser - the default FTPFileEntryParser to be usedby this object. This may later be changed using the init() method.
Parameters:
  encoding - The encoding to use the FTPFileList created, with an initializedof unparsed lines of output. Will be null if the listing cannotbe read from the stream.
exception:
  IOException - Thrown on any failure to read from the socket.



create
public static FTPFileList create(InputStream stream, FTPFileEntryParser parser) throws IOException(Code)
The only way to create an FTPFileList object. Invokes the private constructor and then reads the stream supplied stream to build the intermediate array of "lines" which will later be parsed into FTPFile object.
Parameters:
  stream - The input stream created by reading the socket on whichthe output of the LIST command was returned
Parameters:
  parser - the default FTPFileEntryParser to be usedby this object. This may later be changed using the init() method. the FTPFileList created, with an initializedof unparsed lines of output. Will be null if the listing cannotbe read from the stream.
exception:
  IOException - Thrown on any failure to read from the socket.



getFiles
public FTPFile[] getFiles()(Code)
returns an array of FTPFile objects for all the files in the directory listing an array of FTPFile objects for all the files in the directorylistinge



getLines
List getLines()(Code)
Package private accessor for the collection of raw input lines. vector containing all the raw input lines returned from the FTPserver



getParser
FTPFileEntryParser getParser()(Code)
Accessor for this object's default parser. this object's default parser.



iterator
public FTPFileIterator iterator()(Code)
create an iterator over this list using the parser with which this list was initally created an iterator over this list using the list's default parser.



iterator
public FTPFileIterator iterator(FTPFileEntryParser parser)(Code)
create an iterator over this list using the supplied parser
Parameters:
  parser - The user-supplied parser with which the list is to beiterated, may be different from this list's default parser. an iterator over this list using the supplied parser.



readStream
public void readStream(InputStream stream, String encoding) throws IOException(Code)
internal method for reading the input into the lines vector.
Parameters:
  stream - The socket stream on which the input will be read.
Parameters:
  encoding - The encoding to use.
exception:
  IOException - thrown on any failure to read the stream



readStream
public void readStream(InputStream stream) throws IOException(Code)
internal method for reading the input into the lines vector.
Parameters:
  stream - The socket stream on which the input will be read.
exception:
  IOException - thrown on any failure to read the stream



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.