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


java.lang.Object
   org.apache.tools.ant.util.ResourceUtils

ResourceUtils
public class ResourceUtils (Code)
This class provides utility methods to process Resources.
since:
   Ant 1.5.2




Method Summary
public static  intcompareContent(Resource r1, Resource r2, boolean text)
     Compare the content of two Resources.
public static  booleancontentEquals(Resource r1, Resource r2, boolean text)
     Compares the contents of two Resources.
Parameters:
  r1 - the Resource whose content is to be compared.
Parameters:
  r2 - the other Resource whose content is to be compared.
Parameters:
  text - true if the content is to be treated as text anddifferences in kind of line break are to be ignored.
public static  voidcopyResource(Resource source, Resource dest)
     Convenience method to copy content from one Resource to another.
public static  voidcopyResource(Resource source, Resource dest, Project project)
     Convenience method to copy content from one Resource to another.
public static  voidcopyResource(Resource source, Resource dest, FilterSetCollection filters, Vector filterChains, boolean overwrite, boolean preserveLastModified, String inputEncoding, String outputEncoding, Project project)
     Convenience method to copy content from one Resource to another specifying whether token filtering must be used, whether filter chains must be used, whether newer destination files may be overwritten and whether the last modified time of dest file should be made equal to the last modified time of source.
public static  Resource[]selectOutOfDateSources(ProjectComponent logTo, Resource[] source, FileNameMapper mapper, ResourceFactory targets)
     Tells which source files should be reprocessed based on the last modification date of target files.
Parameters:
  logTo - where to send (more or less) interesting output.
Parameters:
  source - array of resources bearing relative path and lastmodification date.
Parameters:
  mapper - filename mapper indicating how to find the targetfiles.
Parameters:
  targets - object able to map as a resource a relative pathat destination.
public static  Resource[]selectOutOfDateSources(ProjectComponent logTo, Resource[] source, FileNameMapper mapper, ResourceFactory targets, long granularity)
     Tells which source files should be reprocessed based on the last modification date of target files.
Parameters:
  logTo - where to send (more or less) interesting output.
Parameters:
  source - array of resources bearing relative path and lastmodification date.
Parameters:
  mapper - filename mapper indicating how to find the targetfiles.
Parameters:
  targets - object able to map as a resource a relative pathat destination.
Parameters:
  granularity - The number of milliseconds leeway to givebefore deciding a target is out of date.
public static  ResourceCollectionselectOutOfDateSources(ProjectComponent logTo, ResourceCollection source, FileNameMapper mapper, ResourceFactory targets, long granularity)
     Tells which sources should be reprocessed based on the last modification date of targets.
Parameters:
  logTo - where to send (more or less) interesting output.
Parameters:
  source - ResourceCollection.
Parameters:
  mapper - filename mapper indicating how to find the target Resources.
Parameters:
  targets - object able to map a relative path as a Resource.
Parameters:
  granularity - The number of milliseconds leeway to givebefore deciding a target is out of date.
public static  voidsetLastModified(Touchable t, long time)
     Set the last modified time of an object implementing org.apache.tools.ant.types.resources.Touchable .



Method Detail
compareContent
public static int compareContent(Resource r1, Resource r2, boolean text) throws IOException(Code)
Compare the content of two Resources. A nonexistent Resource's content is "less than" that of an existing Resource; a directory-type Resource's content is "less than" that of a file-type Resource.
Parameters:
  r1 - the Resource whose content is to be compared.
Parameters:
  r2 - the other Resource whose content is to be compared.
Parameters:
  text - true if the content is to be treated as text anddifferences in kind of line break are to be ignored. a negative integer, zero, or a positive integer as the firstargument is less than, equal to, or greater than the second.
throws:
  IOException - if the Resources cannot be read.
since:
   Ant 1.7



contentEquals
public static boolean contentEquals(Resource r1, Resource r2, boolean text) throws IOException(Code)
Compares the contents of two Resources.
Parameters:
  r1 - the Resource whose content is to be compared.
Parameters:
  r2 - the other Resource whose content is to be compared.
Parameters:
  text - true if the content is to be treated as text anddifferences in kind of line break are to be ignored. true if the content of the Resources is the same.
throws:
  IOException - if the Resources cannot be read.
since:
   Ant 1.7



copyResource
public static void copyResource(Resource source, Resource dest) throws IOException(Code)
Convenience method to copy content from one Resource to another. No filtering is performed.
Parameters:
  source - the Resource to copy from.Must not be null.
Parameters:
  dest - the Resource to copy to.Must not be null.
throws:
  IOException - if the copying fails.
since:
   Ant 1.7



copyResource
public static void copyResource(Resource source, Resource dest, Project project) throws IOException(Code)
Convenience method to copy content from one Resource to another. No filtering is performed.
Parameters:
  source - the Resource to copy from.Must not be null.
Parameters:
  dest - the Resource to copy to.Must not be null.
Parameters:
  project - the project instance.
throws:
  IOException - if the copying fails.
since:
   Ant 1.7



copyResource
public static void copyResource(Resource source, Resource dest, FilterSetCollection filters, Vector filterChains, boolean overwrite, boolean preserveLastModified, String inputEncoding, String outputEncoding, Project project) throws IOException(Code)
Convenience method to copy content from one Resource to another specifying whether token filtering must be used, whether filter chains must be used, whether newer destination files may be overwritten and whether the last modified time of dest file should be made equal to the last modified time of source.
Parameters:
  source - the Resource to copy from.Must not be null.
Parameters:
  dest - the Resource to copy to.Must not be null.
Parameters:
  filters - the collection of filters to apply to this copy.
Parameters:
  filterChains - filterChains to apply during the copy.
Parameters:
  overwrite - Whether or not the destination Resource should beoverwritten if it already exists.
Parameters:
  preserveLastModified - Whether or not the last modified time ofthe destination Resource should be set to thatof the source.
Parameters:
  inputEncoding - the encoding used to read the files.
Parameters:
  outputEncoding - the encoding used to write the files.
Parameters:
  project - the project instance.
throws:
  IOException - if the copying fails.
since:
   Ant 1.7



selectOutOfDateSources
public static Resource[] selectOutOfDateSources(ProjectComponent logTo, Resource[] source, FileNameMapper mapper, ResourceFactory targets)(Code)
Tells which source files should be reprocessed based on the last modification date of target files.
Parameters:
  logTo - where to send (more or less) interesting output.
Parameters:
  source - array of resources bearing relative path and lastmodification date.
Parameters:
  mapper - filename mapper indicating how to find the targetfiles.
Parameters:
  targets - object able to map as a resource a relative pathat destination. array containing the source files which need to becopied or processed, because the targets are out of date or donot exist.



selectOutOfDateSources
public static Resource[] selectOutOfDateSources(ProjectComponent logTo, Resource[] source, FileNameMapper mapper, ResourceFactory targets, long granularity)(Code)
Tells which source files should be reprocessed based on the last modification date of target files.
Parameters:
  logTo - where to send (more or less) interesting output.
Parameters:
  source - array of resources bearing relative path and lastmodification date.
Parameters:
  mapper - filename mapper indicating how to find the targetfiles.
Parameters:
  targets - object able to map as a resource a relative pathat destination.
Parameters:
  granularity - The number of milliseconds leeway to givebefore deciding a target is out of date. array containing the source files which need to becopied or processed, because the targets are out of date or donot exist.
since:
   Ant 1.6.2



selectOutOfDateSources
public static ResourceCollection selectOutOfDateSources(ProjectComponent logTo, ResourceCollection source, FileNameMapper mapper, ResourceFactory targets, long granularity)(Code)
Tells which sources should be reprocessed based on the last modification date of targets.
Parameters:
  logTo - where to send (more or less) interesting output.
Parameters:
  source - ResourceCollection.
Parameters:
  mapper - filename mapper indicating how to find the target Resources.
Parameters:
  targets - object able to map a relative path as a Resource.
Parameters:
  granularity - The number of milliseconds leeway to givebefore deciding a target is out of date. ResourceCollection.
since:
   Ant 1.7



setLastModified
public static void setLastModified(Touchable t, long time)(Code)
Set the last modified time of an object implementing org.apache.tools.ant.types.resources.Touchable .
Parameters:
  t - the Touchable whose modified time is to be set.
Parameters:
  time - the time to which the last modified time is to be set.if this is -1, the current time is used.
since:
   Ant 1.7



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.