Java Doc for FileResource.java in  » Build » ANT » org » apache » tools » ant » types » resources » 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 » Build » ANT » org.apache.tools.ant.types.resources 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.tools.ant.types.Resource
   org.apache.tools.ant.types.resources.FileResource

FileResource
public class FileResource extends Resource implements Touchable(Code)
A Resource representation of a File.
since:
   Ant 1.7



Constructor Summary
public  FileResource()
     Default constructor.
public  FileResource(File b, String name)
     Construct a new FileResource using the specified basedir and relative name.
public  FileResource(File f)
     Construct a new FileResource from a File.
public  FileResource(Project p, String s)
     Constructor for Ant attribute introspection.

Method Summary
public  intcompareTo(Object another)
     Compare this FileResource to another Resource.
Parameters:
  another - the other Resource against which to compare.
public  booleanequals(Object another)
     Compare another Object to this FileResource for equality.
Parameters:
  another - the other Object to compare.
public  FilegetBaseDir()
     Return the basedir to which the name is relative.
public  FilegetFile()
     Get the file represented by this FileResource.
public  InputStreamgetInputStream()
     Return an InputStream for reading the contents of this Resource.
public  longgetLastModified()
     Get the modification time in milliseconds since 01.01.1970 .
public  StringgetName()
     Get the name of this FileResource.
protected  FilegetNotNullFile()
     Get the file represented by this FileResource, ensuring it is not null.
public  OutputStreamgetOutputStream()
     Get an OutputStream for the Resource.
public  longgetSize()
     Get the size of this Resource.
public  inthashCode()
     Get the hash code for this Resource.
public  booleanisDirectory()
     Learn whether the resource is a directory.
public  booleanisExists()
     Learn whether this file exists.
public  booleanisFilesystemOnly()
     Fulfill the ResourceCollection contract.
public  voidsetBaseDir(File b)
     Set the basedir for this FileResource.
public  voidsetFile(File f)
     Set the File for this FileResource.
public  voidsetRefid(Reference r)
     Overrides the super version.
public  StringtoString()
     Get the string representation of this Resource.
public  voidtouch(long modTime)
     Implement the Touchable interface.


Constructor Detail
FileResource
public FileResource()(Code)
Default constructor.



FileResource
public FileResource(File b, String name)(Code)
Construct a new FileResource using the specified basedir and relative name.
Parameters:
  b - the basedir as File.
Parameters:
  name - the relative filename.



FileResource
public FileResource(File f)(Code)
Construct a new FileResource from a File.
Parameters:
  f - the File represented.



FileResource
public FileResource(Project p, String s)(Code)
Constructor for Ant attribute introspection.
Parameters:
  p - the Project against which to resolve s.
Parameters:
  s - the absolute or Project-relative filename as a String.
See Also:   org.apache.tools.ant.IntrospectionHelper




Method Detail
compareTo
public int compareTo(Object another)(Code)
Compare this FileResource to another Resource.
Parameters:
  another - the other Resource against which to compare. a negative integer, zero, or a positive integer as this FileResourceis less than, equal to, or greater than the specified Resource.



equals
public boolean equals(Object another)(Code)
Compare another Object to this FileResource for equality.
Parameters:
  another - the other Object to compare. true if another is a FileResource representing the same file.



getBaseDir
public File getBaseDir()(Code)
Return the basedir to which the name is relative. the basedir as File.



getFile
public File getFile()(Code)
Get the file represented by this FileResource. the File.



getInputStream
public InputStream getInputStream() throws IOException(Code)
Return an InputStream for reading the contents of this Resource. an InputStream object.
throws:
  IOException - if an error occurs.



getLastModified
public long getLastModified()(Code)
Get the modification time in milliseconds since 01.01.1970 . 0 if the resource does not exist.



getName
public String getName()(Code)
Get the name of this FileResource. If the basedir is set, the name will be relative to that. Otherwise the basename only will be returned. the name of this resource.



getNotNullFile
protected File getNotNullFile()(Code)
Get the file represented by this FileResource, ensuring it is not null. the not-null File.
throws:
  BuildException - if file is null.



getOutputStream
public OutputStream getOutputStream() throws IOException(Code)
Get an OutputStream for the Resource. an OutputStream to which content can be written.
throws:
  IOException - if unable to provide the content of thisResource as a stream.
throws:
  UnsupportedOperationException - if OutputStreams are notsupported for this Resource type.



getSize
public long getSize()(Code)
Get the size of this Resource. the size, as a long, 0 if the Resource does not exist.



hashCode
public int hashCode()(Code)
Get the hash code for this Resource. hash code as int.



isDirectory
public boolean isDirectory()(Code)
Learn whether the resource is a directory. boolean flag indicating if the resource is a directory.



isExists
public boolean isExists()(Code)
Learn whether this file exists. true if this resource exists.



isFilesystemOnly
public boolean isFilesystemOnly()(Code)
Fulfill the ResourceCollection contract. whether this Resource is a FileResource.



setBaseDir
public void setBaseDir(File b)(Code)
Set the basedir for this FileResource.
Parameters:
  b - the basedir as File.



setFile
public void setFile(File f)(Code)
Set the File for this FileResource.
Parameters:
  f - the File to be represented.



setRefid
public void setRefid(Reference r)(Code)
Overrides the super version.
Parameters:
  r - the Reference to set.



toString
public String toString()(Code)
Get the string representation of this Resource. this FileResource formatted as a String.



touch
public void touch(long modTime)(Code)
Implement the Touchable interface.
Parameters:
  modTime - new last modification time.



Fields inherited from org.apache.tools.ant.types.Resource
final protected static int MAGIC(Code)(Java Doc)
final public static long UNKNOWN_DATETIME(Code)(Java Doc)
final public static long UNKNOWN_SIZE(Code)(Java Doc)

Methods inherited from org.apache.tools.ant.types.Resource
public Object clone()(Code)(Java Doc)
public int compareTo(Object other)(Code)(Java Doc)
public boolean equals(Object other)(Code)(Java Doc)
public InputStream getInputStream() throws IOException(Code)(Java Doc)
public long getLastModified()(Code)(Java Doc)
protected static int getMagicNumber(byte[] seed)(Code)(Java Doc)
public String getName()(Code)(Java Doc)
public OutputStream getOutputStream() throws IOException(Code)(Java Doc)
public long getSize()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public boolean isDirectory()(Code)(Java Doc)
public boolean isExists()(Code)(Java Doc)
public boolean isFilesystemOnly()(Code)(Java Doc)
public Iterator iterator()(Code)(Java Doc)
public void setDirectory(boolean directory)(Code)(Java Doc)
public void setExists(boolean exists)(Code)(Java Doc)
public void setLastModified(long lastmodified)(Code)(Java Doc)
public void setName(String name)(Code)(Java Doc)
public void setRefid(Reference r)(Code)(Java Doc)
public void setSize(long size)(Code)(Java Doc)
public int size()(Code)(Java Doc)
final public String toLongString()(Code)(Java Doc)
public String toString()(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.