Java Doc for FTPFile.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.FTPFile

FTPFile
public class FTPFile implements Serializable(Code)
The FTPFile class is used to represent information about files stored on an FTP server. Because there is no standard representation for file information on FTP servers, it may not always be possible to extract all the information that can be represented by FTPFile, or it may even be possible to extract more information. In cases where more information can be extracted, you will want to subclass FTPFile and implement your own org.apache.commons.net.ftp.FTPFileListParser to extract the information. However, most FTP servers return file information in a format that can be completely parsed by org.apache.commons.net.ftp.DefaultFTPFileListParser and stored in FTPFile.


author:
   Daniel F. Savarese
See Also:   FTPFileListParser
See Also:   DefaultFTPFileListParser
See Also:   FTPClient.listFiles



Field Summary
final public static  intDIRECTORY_TYPE
     A constant indicating an FTPFile is a directory.
final public static  intEXECUTE_PERMISSION
     A constant indicating file execute permission or directory listing permission.
final public static  intFILE_TYPE
     A constant indicating an FTPFile is a file.
final public static  intGROUP_ACCESS
     A constant indicating group access permissions.
final public static  intREAD_PERMISSION
     A constant indicating file/directory read permission.
final public static  intSYMBOLIC_LINK_TYPE
     A constant indicating an FTPFile is a symbolic link.
final public static  intUNKNOWN_TYPE
     A constant indicating an FTPFile is of unknown type.
final public static  intUSER_ACCESS
     A constant indicating user access permissions.
final public static  intWORLD_ACCESS
     A constant indicating world access permissions.
final public static  intWRITE_PERMISSION
     A constant indicating file/directory write permission.
 Calendar_date
    
 boolean[]_permissions
    
 String_rawListing_user_group_name_link
    
 long_size
    
 int_type_hardLinkCount
    

Constructor Summary
public  FTPFile()
     Creates an empty FTPFile.

Method Summary
public  StringgetGroup()
     Returns the name of the group owning the file.
public  intgetHardLinkCount()
     Return the number of hard links to this file.
public  StringgetLink()
     If the FTPFile is a symbolic link, this method returns the name of the file being pointed to by the symbolic link.
public  StringgetName()
     Return the name of the file.
public  StringgetRawListing()
     Get the original FTP server raw listing used to initialize the FTPFile.
public  longgetSize()
     Return the file size in bytes.
public  CalendargetTimestamp()
     Returns the file timestamp.
public  intgetType()
     Return the type of the file (one of the _TYPE constants), e.g., if it is a directory, a regular file, or a symbolic link.
public  StringgetUser()
     Returns the name of the user owning the file.
public  booleanhasPermission(int access, int permission)
     Determines if the given access group (one of the _ACCESS constants) has the given access permission (one of the _PERMISSION constants) to the file.
public  booleanisDirectory()
     Determine if the file is a directory.
public  booleanisFile()
     Determine if the file is a regular file.
public  booleanisSymbolicLink()
     Determine if the file is a symbolic link.
public  booleanisUnknown()
     Determine if the type of the file is unknown.
public  voidsetGroup(String group)
     Set the name of the group owning the file.
public  voidsetHardLinkCount(int links)
     Set the number of hard links to this file.
public  voidsetLink(String link)
     If the FTPFile is a symbolic link, use this method to set the name of the file being pointed to by the symbolic link.
public  voidsetName(String name)
     Set the name of the file.
public  voidsetPermission(int access, int permission, boolean value)
     Set if the given access group (one of the _ACCESS constants) has the given access permission (one of the _PERMISSION constants) to the file.
public  voidsetRawListing(String rawListing)
     Set the original FTP server raw listing from which the FTPFile was created.
public  voidsetSize(long size)
     Set the file size in bytes.
public  voidsetTimestamp(Calendar date)
     Set the file timestamp.
public  voidsetType(int type)
     Set the type of the file (DIRECTORY_TYPE, FILE_TYPE, etc.).
public  voidsetUser(String user)
     Set the name of the user owning the file.
public  StringtoString()
     Returns a string representation of the FTPFile information.

Field Detail
DIRECTORY_TYPE
final public static int DIRECTORY_TYPE(Code)
A constant indicating an FTPFile is a directory. **



EXECUTE_PERMISSION
final public static int EXECUTE_PERMISSION(Code)
A constant indicating file execute permission or directory listing permission.



FILE_TYPE
final public static int FILE_TYPE(Code)
A constant indicating an FTPFile is a file. **



GROUP_ACCESS
final public static int GROUP_ACCESS(Code)
A constant indicating group access permissions. **



READ_PERMISSION
final public static int READ_PERMISSION(Code)
A constant indicating file/directory read permission. **



SYMBOLIC_LINK_TYPE
final public static int SYMBOLIC_LINK_TYPE(Code)
A constant indicating an FTPFile is a symbolic link. **



UNKNOWN_TYPE
final public static int UNKNOWN_TYPE(Code)
A constant indicating an FTPFile is of unknown type. **



USER_ACCESS
final public static int USER_ACCESS(Code)
A constant indicating user access permissions. **



WORLD_ACCESS
final public static int WORLD_ACCESS(Code)
A constant indicating world access permissions. **



WRITE_PERMISSION
final public static int WRITE_PERMISSION(Code)
A constant indicating file/directory write permission. **



_date
Calendar _date(Code)



_permissions
boolean[] _permissions(Code)



_rawListing_user_group_name_link
String _rawListing_user_group_name_link(Code)



_size
long _size(Code)



_type_hardLinkCount
int _type_hardLinkCount(Code)




Constructor Detail
FTPFile
public FTPFile()(Code)
Creates an empty FTPFile. **




Method Detail
getGroup
public String getGroup()(Code)
Returns the name of the group owning the file. Sometimes this will be a string representation of the group number.

The name of the group owning the file.




getHardLinkCount
public int getHardLinkCount()(Code)
Return the number of hard links to this file. This is not to be confused with symbolic links.

The number of hard links to this file.




getLink
public String getLink()(Code)
If the FTPFile is a symbolic link, this method returns the name of the file being pointed to by the symbolic link. Otherwise it returns null.

The file pointed to by the symbolic link (null if the FTPFileis not a symbolic link).




getName
public String getName()(Code)
Return the name of the file.

The name of the file.




getRawListing
public String getRawListing()(Code)
Get the original FTP server raw listing used to initialize the FTPFile.

The original FTP server raw listing used to initialize theFTPFile.




getSize
public long getSize()(Code)
Return the file size in bytes.

The file size in bytes.




getTimestamp
public Calendar getTimestamp()(Code)
Returns the file timestamp. This usually the last modification time.

A Calendar instance representing the file timestamp.




getType
public int getType()(Code)
Return the type of the file (one of the _TYPE constants), e.g., if it is a directory, a regular file, or a symbolic link.

The type of the file.




getUser
public String getUser()(Code)
Returns the name of the user owning the file. Sometimes this will be a string representation of the user number.

The name of the user owning the file.




hasPermission
public boolean hasPermission(int access, int permission)(Code)
Determines if the given access group (one of the _ACCESS constants) has the given access permission (one of the _PERMISSION constants) to the file.


Parameters:
  access - The access group (one of the _ACCESS constants)
Parameters:
  permission - The access permission (one of the _PERMISSION constants)




isDirectory
public boolean isDirectory()(Code)
Determine if the file is a directory.

True if the file is of type DIRECTORY_TYPE, false ifnot.




isFile
public boolean isFile()(Code)
Determine if the file is a regular file.

True if the file is of type FILE_TYPE, false ifnot.




isSymbolicLink
public boolean isSymbolicLink()(Code)
Determine if the file is a symbolic link.

True if the file is of type UNKNOWN_TYPE, false ifnot.




isUnknown
public boolean isUnknown()(Code)
Determine if the type of the file is unknown.

True if the file is of type UNKNOWN_TYPE, false ifnot.




setGroup
public void setGroup(String group)(Code)
Set the name of the group owning the file. This may be a string representation of the group number.


Parameters:
  group - The name of the group owning the file.




setHardLinkCount
public void setHardLinkCount(int links)(Code)
Set the number of hard links to this file. This is not to be confused with symbolic links.


Parameters:
  links - The number of hard links to this file.




setLink
public void setLink(String link)(Code)
If the FTPFile is a symbolic link, use this method to set the name of the file being pointed to by the symbolic link.


Parameters:
  link - The file pointed to by the symbolic link.




setName
public void setName(String name)(Code)
Set the name of the file.


Parameters:
  name - The name of the file.




setPermission
public void setPermission(int access, int permission, boolean value)(Code)
Set if the given access group (one of the _ACCESS constants) has the given access permission (one of the _PERMISSION constants) to the file.


Parameters:
  access - The access group (one of the _ACCESS constants)
Parameters:
  permission - The access permission (one of the _PERMISSION constants)
Parameters:
  value - True if permission is allowed, false if not.




setRawListing
public void setRawListing(String rawListing)(Code)
Set the original FTP server raw listing from which the FTPFile was created.


Parameters:
  rawListing - The raw FTP server listing.




setSize
public void setSize(long size)(Code)
Set the file size in bytes.
Parameters:
  size - The file size in bytes.



setTimestamp
public void setTimestamp(Calendar date)(Code)
Set the file timestamp. This usually the last modification time. The parameter is not cloned, so do not alter its value after calling this method.


Parameters:
  date - A Calendar instance representing the file timestamp.




setType
public void setType(int type)(Code)
Set the type of the file (DIRECTORY_TYPE, FILE_TYPE, etc.).


Parameters:
  type - The integer code representing the type of the file.




setUser
public void setUser(String user)(Code)
Set the name of the user owning the file. This may be a string representation of the user number;


Parameters:
  user - The name of the user owning the file.




toString
public String toString()(Code)
Returns a string representation of the FTPFile information. This will be the raw FTP server listing that was used to initialize the FTPFile instance.

A string representation of the FTPFile information.




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.